Answer to Question #4563 in Java | JSP | JSF for dayo
Question #4563
hi,my name is dayo.i am new to java programming i am bout to write my first program which i copied from a textbook i am reading.
// A program to display the message
// "Hello World!" on standard output
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
} // end of class HelloWorld
but the compiler is giving an error system.out.print class.the compiler made a suggestion 1 should be a package class before it can be used by the compiler.pls i do i go about it.thank you.
// A program to display the message
// "Hello World!" on standard output
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
} // end of class HelloWorld
but the compiler is giving an error system.out.print class.the compiler made a suggestion 1 should be a package class before it can be used by the compiler.pls i do i go about it.thank you.
Expert's answer
public class Main {
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}
Need a fast expert's response?
Submit orderand get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment