Java基础语法
1、注释、标识符、关键字
注释,并不参与执行程序,是为了便于理解。书写注释是良好的习惯。
java注释有三种
标识符
abstract | assert | boolean | break | byte |
---|
case | catch | char | class | const |
continue | default | do | double | else |
enum | extends | final | finally | float |
for | goto | if | implements | import |
instanceof | int | interface | long | native |
new | package | private | protected | public |
return | stricttfp | short | static | super |
switch | synchronized | this | throw | throws |
transient | try | void | volatile | while |
类名,变量名,方法名都被称为标识符。
### 注意:
public class demo01 {
public static void main(String[] args) {
String Ahello="qinjiang";
String ahello="qinjiang";
String $hello="qinjiang";
String 王者荣耀="青铜";
System.out.printf("王者荣耀");
System.out.printf("Ahello");
}
}