java prints a string and calls it within the main of method
- 2020-06-12 09:04:31
- OfStack
This is the first program to write Java.
This is the basic framework of java
package com.itheima;
/**
* 1 , write 1 Method (name is optional, but must match Java Code specification), method inside print 1 String, and in main() Call it within a method.
* @author 281167413@qq.com
*/
public class Test1 {
public static void main(String[] args)
{
System.out.println("My first station! itheima.");
}
}
package com.itheima just indicates that this is the input for that package
public class Test1 states that the name of this class is Test1
public static void main(String[] args) defines the main function. This is where the program executes, but not all programs require main to execute
This is the simplest java program... The java hello world!