Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment
Java 学习:结构
顺序结构
从上到下依次执行
是任何算法都离不开的一种基本算法结构
选择结构
“if” Single Selection Structure
12if (boolean){ ...}
“if” Double Selection Structure
12if (boolean) { ...} else { ... }
“if” Triple Selection Structure
123if (boolean) { ...} else if (boolean) { ...} else { ... }
“if” Nested Selection Structure
123if (boolean) { if (boolean) { ... }}
“switch” Triple Selection Structure
Java 学习:Scanner
Scanner 对象
功能:
获取用户输入
基本语法
1Scanner s = new Scanner(System.in);
next()
一定要读取有效字符后才可以结束输入
对输入有效字符之前遇到的空白,next()方法会自动将其去掉
只有输入有效字符后才将后面输入的空白作为分隔符或者结束符
next() 不能得到带有空格的字符串
nextLine()
以Enter为结束符,也就是说nextLine()方法返回的是输入回车之前的所有字符
可以获得空白
代码笔记 https://git.sgxi.cn/ation_ciger/java_learn/src/branch/master/src/cn/sgxi/Scanner