I want to know that is there a way to determine a output of any java program without any dedicated IDE? For an example, a program snippet may be like...
int i=3,n=0;
while (i<4)
{
n++;
i--;
}
System.out.println(n);
I want to know that is there a way to determine a output of any java program without any dedicated IDE? For an example, a program snippet may be like...
int i=3,n=0;
while (i<4)
{
n++;
i--;
}
System.out.println(n);
If you got JDK9+ you can run your java code on prompt with no ide. try run jshell
on prompt/cmd/powershell and test your code. if you need run a lot of line on jshell try /edit
If you use Java version 9 or higher, you can use the Java REPL (JShell) to try pieces of code. Install it on your computer, or use an online service (e.g. replit.com).
Or, use a text editor, and create a .java file, compile it and run it: https://docs.oracle.com/javase/tutorial/getStarted/cupojava/win32.html