In the above code you just need to write the path of jdk and path of file that contains the java code.
File Name:Demo.java
File Content:
public class Demo
{
public static void main(String...
Type: Posts; User: Sahil Arora
In the above code you just need to write the path of jdk and path of file that contains the java code.
File Name:Demo.java
File Content:
public class Demo
{
public static void main(String...
i don't know exactly, i got this code from my friend even he doesn't know how it is working.
Do you have any idea?
i want to capture the output that goes to console.
Is there any method in any API through which i can get the output of simple java program.
Like there is a method Diagnostic.getDiagnostic() which returns a list of Compiler errors in a program.
class Demo
{
public static void main(String arg[])
{
System.out.println("Yes!!!");
}
}
Above code is written in a file Demo.java.
I want to save the output of a java program in a file.