--- 又叫C++--
Microsoft 开发.net
![image-20210209183607577](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images\image-
)
![image-20210209184740436](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
抓住机遇,从而进步成功
![image-20210209185917693](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
write once,run anywhere!
安装注意环境变量配置!
![image-20210209195824939](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
此处注意 cmd 运行 javac和java
JAVA是大小写敏感
用英文写,中文会有乱码
文件名和类名保持一致
编译型一次翻译完
解释型为走一步翻译一步,较为耗内存,
不过电脑目前都是8G内存,编译与解释界限逐渐模糊
![image-20210209225739195](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
如 psvm,sout,在IDE(Integrated Development Environment)中用好,事半功倍
单行注释: / 文字 /
多行注释:/* 文字 */
文档注释:/**
? *
? */
![image-20210210102039712](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
![image-20210210103915561](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
标识符应该用(A-Z和a-z),美元符($),下划线(_)开头
![image-20210210105930992](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
(特别注意标识符大小写敏感!)
![image-20210210114055459](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images\image-20210210114055459.png
)
![image-20210210114106032](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
![image-20210210123155239](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
尽量不用浮点数比较
![image-20210210134747612](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images\image-20210210134747612.png
)
例子见Java SE的0x04~0x06
变量名,变量类型,作用域
![image-20210210135802264](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
.
![image-20210210141530751](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
![image-20210210193353877](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
&&,||,!( 与,或,非)
类似于包
如www.kuangstudy.com
com.kuangstudy.blogs
包名倒着写
![image-20210210205016434](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
![image-20210212111911132](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
![image-20210212105225092](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
Scanner对象中,next()是以空格为结束符,
而nextLine()以回车为结束符
![image-20210212113310845](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
![image-20210212113648965](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
)
总览:![image-20210213085856435](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
重点是:![image-20210213091727694](C:\Users\Dell\AppData\Roaming\Typora\typora-user-images!
)
此处补充: \t \r \n \f
- \t:水平制表符。相当于tab
- \r:回车,从当前位置移动到下一行的开头
- \n:回车换行。当前位置移动到下一行的开头
- \f:换页。当前位置移动到下一页的开头
补充增强型for循环:
for(int x:numbers) 这句话是取出数组numbers的每一个数
![](
)
原文:https://www.cnblogs.com/White-Security/p/14406100.html