class Main { // 声明一个公有的静态方法,名为 main,该方法是程序的入口 public static void main(String[] args) { // 输出字符串 Hello world! System.out.println("Hello world!"); } }