PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, August 16, 2022

[FIXED] How to determine a java program output without any IDE?

 August 16, 2022     java, loops, output     No comments   

Issue

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);

Solution

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



Answered By - Ruigerd
Answer Checked By - Mildred Charles (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing