answersLogoWhite

0

public class Hello

{//opens the class

public static void main(String args[]) //main method

{

System.out.println("Hello World"); //prints to the screen

}//closes the main method

}//closes the class

After the above code is compiled and ran, it should display the words "Hello World" on the screen.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How do you develop a tic tac toe program in java?

See related links for sample code and step-by-step Java tutor on how to develop a tic-tac-toe program.


What is a function in java?

The term equivalent to functions in Java is "methods". Methods are pieces of code that are used to make some functionality. Ex: public String getName(){ return "Anand"; } The above is a sample method


Sample code in java programming?

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


How do you do this java code?

You have to specify the task that you wish me to help you with the Java code.


What does the Java compiler translate Java source code to?

The Java compiler translates Java source code to Java byte code.


Is there a sample program for constructor?

All Java programs would have a constructor... public class Test { public Test(){ ... } ..... } This is a constructor. Even if you dont code the constructor Java would automatically place a default constructor for compilation.


What is a simple java code and explain what the code does?

int a;This simple Java statement declares an integer.


In the first step of the Java hybrid compilation process Java program code is converted into an intermediate format called .?

Java byte code.


What kind of file contain java source code?

'.java' files contain java source code. One can access these files on windows by using 'notepad'.


Difference between a java complier and the Java JIT?

A java compiler takes Java source code and turns it into Java bytecode, which can then be run by the java virtual machine.Using JIT means that the java code will be compiled and executed at the time that you run the program, which will slow down the program because it has to compile the code at the same time that it runs.


How can add java code to java server page?

Scriplet.


Java code for tax deduction in database connection?

Java code for tax deduction in database connection?