文档注释 /** */
多行注释 /* */
单行注释 //
class:类别。
public:公共的。
static:表示静态。
void:,返回值类型。为空,没有返回值。
public class HelloWorld{
public static void main(String[] args){
System.out.printf("hello world!!");
}
}
关于Java中print、printf、println的区别
1、print和println
print和println都是输出,区别就是前者不换行,后者自带换行功能。
但是在print中可以加入\n实现换行功能。
2、printf
格式化输出。(后续会补充具体使用方法)。