2025年2月10日

搞笑玩法代码

摘要: import java.util.Scanner; public class LoveAndEmotion { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out. 阅读全文

posted @ 2025-02-10 20:45 别老把脚尖踮起 阅读(16) 评论(0) 推荐(0)

三元运算符

摘要: package operator; //三元运算符 public class Demo07 { public static void main(String[] args) { //x ? y 😒 //当x==true结果为y 否则为z int score = 50; String type = 阅读全文

posted @ 2025-02-10 20:45 别老把脚尖踮起 阅读(11) 评论(0) 推荐(0)

赋值运算符

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

posted @ 2025-02-10 20:44 别老把脚尖踮起 阅读(9) 评论(0) 推荐(0)

按位或运算

摘要: package operator; public class Demo05 { public static void main(String[] args) { /* A = 0011 1100 B = 0000 1101 A & B = 0000 1100 对应位为相同结果 为相同 对应位不相同结 阅读全文

posted @ 2025-02-10 20:43 别老把脚尖踮起 阅读(11) 评论(0) 推荐(0)

逻辑运算符

摘要: package operator; //逻辑运算符 public class Demo4 { public static void main(String[] args) { //与(两个都要要and) 或(其中一个or) 非(非你即我 取反的意思) boolean a = false; boole 阅读全文

posted @ 2025-02-10 20:43 别老把脚尖踮起 阅读(24) 评论(0) 推荐(0)

自增(自减)运算符

摘要: package operator; public class Demo03 { public static void main(String[] args) { int a = 3; int b = a++;//执行完这行代码后 先给b赋值 在自增 //a=a+1 System.out.printl 阅读全文

posted @ 2025-02-10 20:42 别老把脚尖踮起 阅读(20) 评论(0) 推荐(0)

类型的使用

摘要: package operator; public class Demo02 { public static void main(String[] args) { long a = 1_231_123_123_123L; int b = 123; short c = 10; byte d = 8; S 阅读全文

posted @ 2025-02-10 20:42 别老把脚尖踮起 阅读(13) 评论(0) 推荐(0)

加减乘除运算符

摘要: package operator;//当前的包 public class Demo01 { public static void main(String[] args) { //二元运算符号 //Ctrl+D 复制当前行到下一行 int a = 10; int b = 20; int c = 30; 阅读全文

posted @ 2025-02-10 20:41 别老把脚尖踮起 阅读(13) 评论(0) 推荐(0)

2025年2月7日

JAVA 语法

摘要: Java语法 1.注释:编写代码后#跟解释 让人一目了然 注释不会被执行 是写给代码人看的 1*单行注释//注释一行文字 2多行注释 / ** /注释一段文字 3*文档注释/** */ 有趣的代码注释 可以自行搜 阅读全文

posted @ 2025-02-07 15:00 别老把脚尖踮起 阅读(15) 评论(0) 推荐(0)

2025年2月6日

Hello World

摘要: Hello World 1.新建一个文件夹存放代码 2.新建一个JAVA文件 ​ 文件后缀名为.java ​ Hello.java 3.编写代码 public class Hello{ public static void main(String[] args){ System.out.print( 阅读全文

posted @ 2025-02-06 21:01 别老把脚尖踮起 阅读(36) 评论(0) 推荐(0)

导航