Self java on the first day (the first to write a program)

1. Define class calss

  class{

  }

2. Add the primary (main) method / function

 public static void main(String[] args){

}

3. Add output statements

System.out.println("hello world")

 

4 as follows:

calss java1{

  

 public static void main(String[] args){

  System.out.println("hello world")

}

}

 

Guess you like

Origin www.cnblogs.com/2500486123llp/p/11621196.html