2019年3月16日

(2019.3.16)== 与=

摘要: == 输出为b :(else if(b) 默认为b如果为true执行) = 输出为c :先把值赋给b ,b=false.a不执行;第二句b为false不执行;第三句b=false为最终结果,执行! 阅读全文

posted @ 2019-03-16 11:05 初见—— 阅读(111) 评论(0) 推荐(0)

(2019.3.15)if语句;从键盘读入3个数;三个数进行大小排序

摘要: import java.util.Scanner;class TestIf3{ public static void main(String[] args){ //1.从键盘获取三个数 Scanner s = new Scanner(System.in); System.out.println("请 阅读全文

posted @ 2019-03-16 00:49 初见—— 阅读(1058) 评论(0) 推荐(0)

2019年3月14日

IDEA(使用)

摘要: 1.Idea快捷键的使用 ctr+d 复制黏贴一行代码 ctr+y 删除行 alt+回车 导包 shift+f6 类名修改 ctrl+shift+/ ctrl+/ 注释 ctrl+alt+t 添加代码块 添加get和set等方法 alt+inset 摘.全部: Ctrl+E,最近的文件Ctrl+Sh 阅读全文

posted @ 2019-03-14 20:48 初见—— 阅读(154) 评论(0) 推荐(0)

2019年3月13日

(2019.3.13)导包,创建Scanner(System.in);

摘要: if else使用... 阅读全文

posted @ 2019-03-13 23:03 初见—— 阅读(278) 评论(0) 推荐(0)

2019年3月11日

(初学)如何手动实现整型数值60的二进制到十六进制的转换

摘要: 如何手动实现整型数值60的二进制到十六进制的转换//调用Java自带Integer类实现//练习:60 输出为十六进制(位运算符) //自动调用Integer类现成的方法 int i1 = 60; String binary = Integer.toBinaryString(i1); System. 阅读全文

posted @ 2019-03-11 23:08 初见—— 阅读(1340) 评论(0) 推荐(0)

(2019.3.11) 运算符优先级--x++与++x;( == & | || )

摘要: class Demo{ public static void main(String[] args) { int x = 0,y = 1; /* if (++x == y-- & x++ ==1 || --y == 0) { System.out.println("x="+x+",y="+y); / 阅读全文

posted @ 2019-03-11 22:14 初见—— 阅读(854) 评论(0) 推荐(0)

导航