摘要: public class demo06 { public static void main(String[] args) { /* 位运算 A= 0011 1100 B= 0000 1101 A&B = 0000 1100 //只有都是 1 的时候才为 1 其余时候都是 0 A|B = 0011 1 阅读全文
posted @ 2022-04-21 15:22 回忆也交给时间 阅读(20) 评论(0) 推荐(0)
摘要: # 运算符 ``` java public class demo05 { public static void main(String[] args) { long a=123456788l; int b =520 ; short c= 20; byte d=10; System.out.print 阅读全文
posted @ 2022-04-20 19:22 回忆也交给时间 阅读(19) 评论(0) 推荐(0)
摘要: public class demo04 { //类变量:static static double salary = 2500; final static double pi = 3.14; // 属性:变量 //实例变量:从属于对象;如不进行初始化就会被赋予默认值 0 0.0 null //布尔值默 阅读全文
posted @ 2022-04-20 18:53 回忆也交给时间 阅读(26) 评论(0) 推荐(0)
摘要: public class demo03 { public static void main(String[] args) { int a=125; byte i=(byte)a; System.out.println(i); //强制转换:低-->高 //自动转换:高-->低 /*注意点: 1.不能 阅读全文
posted @ 2022-04-19 23:17 回忆也交给时间 阅读(17) 评论(0) 推荐(0)
摘要: public class demo02 { public static void main(String[] args) { //整数拓展: 进制:二进制0b 八进制0 十进制 十六进制0x int i=0b10; int i1=010; int i2=0x10; System.out.printl 阅读全文
posted @ 2022-04-19 22:11 回忆也交给时间 阅读(23) 评论(0) 推荐(0)
摘要: public class demo01 { public static void main(String[] args) { //类名可用中文也可用英文,但是不建议用中文 String 王者荣耀="百星王者"; //String 王者荣耀="倔强青铜"; //大小写敏感,大写和小写完全是两个类名 S 阅读全文
posted @ 2022-04-19 11:39 回忆也交给时间 阅读(15) 评论(0) 推荐(0)
摘要: Hello world 1.随便新建一个文件夹,存放代码 2.新建一个java文件 。后缀名为.java 。Hello.java 。【注意点】系统没显示后缀名的可以自己手动打开 3.编写代码 public class Hello{ public static void main(String[] a 阅读全文
posted @ 2022-04-18 17:46 回忆也交给时间 阅读(31) 评论(0) 推荐(0)
摘要: 1 public class Hello{ 2 public static void main(string[] args){ 3 System.out.print("hello world!");} 4 } 阅读全文
posted @ 2022-04-18 14:48 回忆也交给时间 阅读(20) 评论(0) 推荐(0)
摘要: write once run anywhere 阅读全文
posted @ 2022-04-17 23:09 回忆也交给时间 阅读(15) 评论(0) 推荐(0)
摘要: #盘符切换 D:#查看当前目录下的所有文件 dir#切换目录 cd#返回上级目录 cd..#清理屏幕 cls#退出终端 exit#查看电脑ip ipconfig ping#打开应用 calc 计算机# mspaint 画图工具# notepad 记事本#ping命令 ping通地址#文件操作 md 阅读全文
posted @ 2022-04-17 16:51 回忆也交给时间 阅读(16) 评论(0) 推荐(0)