摘要: public class MathDemo { public static void main(String[] args) { int a=11; int b=2; System.out.println(a/b);//5;java中 两个整数相除结果还是整数(向下取整) int c=15; int 阅读全文
posted @ 2022-06-19 22:47 还有什么值得拥有 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 表达式中的自动类型转换 总结 public class Demo1 { public static void main(String[] args) { //目标:掌握表达式的自动类型转换的规则 byte a=10; int b=20; double c=1.0; double rs=a+b+c; 阅读全文
posted @ 2022-06-19 22:23 还有什么值得拥有 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 当行注释(快捷键 ctrl+/) // 单行注释 注释一行 选中代码多行注释(快捷键 ctrl+shift+/) /* * 多行注释1 * 多行注释2 */ package com.itheima.literal; public class LiteralDemo { public static v 阅读全文
posted @ 2022-06-19 00:54 还有什么值得拥有 阅读(31) 评论(0) 推荐(0) 编辑
摘要: main=psvm 快速打出public static void main(String[] args){}; sout 快速打出输出语句 System.out.println(); 或者 “要输入的内容”.sout ctrl+alt+l 格式化代码 alt+shift+↓ 当前行代码向下移动 al 阅读全文
posted @ 2022-06-19 00:38 还有什么值得拥有 阅读(45) 评论(0) 推荐(0) 编辑