2022年3月5日

Scanner 对象的next和nextline的区别

摘要: next(): 一定要读取到有效字符后才可以停止输入。 对输入有效字符之前遇到的空白,nsxt()方法将会自动将空白去掉 只有输入有效字符后才将其后面输入的空白作为分隔符或者结束符 next()不能得到带有空格的字符串 nextline(): 以enter为结束符,也就是说nextline()方法返 阅读全文

posted @ 2022-03-05 21:49 我心如铁坚不可摧 阅读(68) 评论(0) 推荐(0)

2021年12月3日

三元运算符

摘要: package com.changl.operator;//三元运算符public class Demo08 { public static void main(String[] args) { // x ? y : z // if x==true,则结果为y,否则结果为z int socre = 阅读全文

posted @ 2021-12-03 09:47 我心如铁坚不可摧 阅读(39) 评论(0) 推荐(0)

连接符

摘要: package com.changl.operator;public class Demo07 { public static void main(String[] args) { int a = 10; int b = 20; a+=b; //a = a+b System.out.println( 阅读全文

posted @ 2021-12-03 09:46 我心如铁坚不可摧 阅读(54) 评论(0) 推荐(0)

位运算

摘要: package com.changl.operator;public class Demo06 { public static void main(String[] args) { /* A = 0011 1100 B = 0000 1101 A&B = 0011 1100 //两个都为1,才是1, 阅读全文

posted @ 2021-12-03 09:45 我心如铁坚不可摧 阅读(44) 评论(0) 推荐(0)

逻辑运算符

摘要: package com.changl.operator;public class Demo05 { //逻辑运算符 public static void main(String[] args) { // 与(and) 或(or) 非(取反) boolean a = true; boolean b = 阅读全文

posted @ 2021-12-03 09:44 我心如铁坚不可摧 阅读(96) 评论(0) 推荐(0)

一元运算符

摘要: package com.changl.operator;public class Demo04 { public static void main(String[] args) { //++ -- 自增,自减 一元运算符 int i = 3; int b = i++; //执行完这行代码后, 先给b 阅读全文

posted @ 2021-12-03 09:43 我心如铁坚不可摧 阅读(129) 评论(0) 推荐(0)

2021年11月27日

数据类型拓展

摘要: public class Demo03 { public static void main(String[] args) { //整数拓展(面试题) 进制 二进制0b 十进制 八进制0 十六进制0x int i1 = 10; int i2 = 010; //八进制0 int i3 = 0x10; / 阅读全文

posted @ 2021-11-27 13:00 我心如铁坚不可摧 阅读(79) 评论(0) 推荐(0)

2021年11月24日

卸载jdk

摘要: 卸载jdk 卸载jdk安装目录 删除JAVA_HOME环境变量 删除path环境变量 阅读全文

posted @ 2021-11-24 09:24 我心如铁坚不可摧 阅读(38) 评论(0) 推荐(0)

2021年11月22日

markdown 学习

摘要: # Markdown学习 ## 标题 ### 三级标题 #### 四级标题 ## 字体 **hello world** *hello world* ***hello world*** ~~hello world~~ ## 引用 > 走向人生巅峰 ## 分割线 *** ## 图片 ![本地图片](C: 阅读全文

posted @ 2021-11-22 10:48 我心如铁坚不可摧 阅读(31) 评论(0) 推荐(0)

2021年11月18日

配置tomcat

摘要: 1. 2. 3. 4.项目发布路径 注意:tomcat发布的路径 阅读全文

posted @ 2021-11-18 11:30 我心如铁坚不可摧 阅读(36) 评论(0) 推荐(0)

导航