System.out.println("hello world")
public class Main{
public static void main(String[] args) {
System.out.println("Hello World of Java!!");
}
}
System.out.println("your text" );
/* this will print your message and then move your cursor to the next line */
/* or */
System.out.print("your text");
/* this will print your message and keep it on the same line */
/* to print multiple items in one statement us a + between them */
System.out.println("age: " + age);
String data = "Some string";
System.out.println(data);
class HelloWorld {
public static void main(String[] args) {
System.out.print("Hello world!");
}
}