Reputation: 123
This is a starting Java program, the classical "hello world", in Netbeans (operation system is Mac). After I clicked on "run" button, the program did run but refused to show the output. What can I do to solve this problem?
PS: here's the Java version on my Mac: java version "1.8.0_60" Java(TM) SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
Thanks in advance.
Upvotes: 3
Views: 425
Reputation: 7149
Try this :
public static void main(String[] args){
System.out.println("hello world"); // use System.out.println instead of using println
}
Upvotes: 3
Reputation: 2614
Looks like you are using the wrong method for the output. Try
System.out.println("hello world");
instead.
The println method you are using does the following:
Prints a message to the current JDBC log stream.
Which is not what you want.
Upvotes: 9