1.Java基本格式
修饰符 class 类名 {
程序代码……
}
public class test {
public static void main(String []args) {
System.out.println("hello world");
}
}
2.可读性
一行只写一条语句;‘{’于语句同行,‘}’独占一行;连续字符串不分成两行(或用‘+’连接)
3.注释
单行://……
多行:/* …… */
修饰符 class 类名 {
程序代码……
}
public class test {
public static void main(String []args) {
System.out.println("hello world");
}
}
一行只写一条语句;‘{’于语句同行,‘}’独占一行;连续字符串不分成两行(或用‘+’连接)
单行://……
多行:/* …… */
道可道,非常道;名可名,非常名。 无名,天地之始,有名,万物之母。 故常无欲,以观其妙,常有欲,以观其徼。 此两者,同出而异名,同谓之玄,玄之又玄,众妙之门。