文章目录
java程序运行机制
- 编写源代码
- 编译(类似翻译官 编译成机器码 也就是二进制 java代码文件经过编译后生成class后缀的字节码文件)
- 运行 (编译后得到.class文件后就可以在java平台上运行编写好的字节码文件)
java代码结构
public class hello{
public static void main(String[] args){
System.out.println("hello,world!");
}
}
程序框架编写public class hello{}
类名要与程序名一样
main方法的编写public static void main(String[] args){}
编写代码System.out.println("hello,world!");