skb29 skb29 - 1 year ago 294
Java Question


I have a problem in sublime text 3. After successful build i am not getting output . even build result is not working for hello world java program and no output please help me
enter image description here

class h{
public static void main(String args[]){
System.out.println("Hello World"); }}

Answer Source

Building means you now have a program. In order to get output, you have to run it. To run it, find your h.class file and run:

java h

This should print the message you're looking for.

Also if you're having this sort of basic problem, it helps to narrow things down to figure out where the problem is coming from. For example you could have first tried without using Sublime Text at all, like this:

$ javac
(nothing is printed but you should now have a h.class file)
$ java h
Hello World

If nothing else, this would make for a better StackOverflow question.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download