摘要: Scanner hasnext()/hasnextline()用于判断是否还有没有输入的字符 package com.guan.Scanner; ​ import java.util.Scanner; ​ public class Demo01 { public static void main(S 阅读全文
posted @ 2021-09-28 17:28 小风扇呜呜呜 阅读(159) 评论(0) 推荐(0)
摘要: JavaDoc 是用来生成自己的API文档的,和文档注释相关。 即: /** * @author guan * @version 1.0 * @since 1.8 * @param name * @return * @throws Exception */ author 作者名 version 版本 阅读全文
posted @ 2021-09-28 11:17 小风扇呜呜呜 阅读(26) 评论(0) 推荐(0)
摘要: 包机制 为了更好地组织类,包机制用于区别类名的命名空间。 包的本质就是文件夹 ctrl+D 复制当前行到下一行 package com.guan.operator; import com.guan.*; //导入此包下的所有类 public class Demo01 { public static 阅读全文
posted @ 2021-09-26 21:11 小风扇呜呜呜 阅读(41) 评论(0) 推荐(0)
摘要: public class Demo08 { public static void main(String[] args) { /* 三元运算符 X ? Y : Z 如果x==true,则结果为Y,否则返回Z. */ int score = 60; //判断及格与否 String perform = 阅读全文
posted @ 2021-08-20 09:19 小风扇呜呜呜 阅读(48) 评论(0) 推荐(0)
摘要: public class Demo11 { public static void main(String[] args) { int a = 10; int b = 20; a = a+b; System.out.println(a); System.out.println(" "); //字符串连 阅读全文
posted @ 2021-08-20 09:08 小风扇呜呜呜 阅读(99) 评论(0) 推荐(0)
摘要: public class Demo15 { public static void main(String[] args) { /* 位运算 A = 0011_1100 B = 0000_1101 则 A&B = 0000_1100 (全1才1,非之则0) A|B = 0011_1101(全0才0,非 阅读全文
posted @ 2021-08-19 21:53 小风扇呜呜呜 阅读(94) 评论(0) 推荐(0)
摘要: public class Demo13 { public static void main(String[] args) { //与(and) 或(or) 非(取反) boolean a = true; boolean b = false; System.out.println("a && b :" 阅读全文
posted @ 2021-08-19 21:27 小风扇呜呜呜 阅读(78) 评论(0) 推荐(0)
摘要: public class Demon12 { public static void main(String[] args) { int a = 3; int b = a++; System.out.println(a); int c =++a; System.out.println(a); Syst 阅读全文
posted @ 2021-08-19 14:03 小风扇呜呜呜 阅读(374) 评论(0) 推荐(0)
摘要: import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;import org.w3c.dom.ls.LSOutput;public class Demo03 { public static void main(String[] args) { 阅读全文
posted @ 2021-08-19 11:39 小风扇呜呜呜 阅读(29) 评论(0) 推荐(0)
摘要: import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;import org.w3c.dom.ls.LSOutput;public class Demo03 { public static void main(String[] args) { 阅读全文
posted @ 2021-08-19 11:21 小风扇呜呜呜 阅读(99) 评论(0) 推荐(0)