摘要: public class jh_10_str的equals { public static void main(String[] args) {// String str = "男";// str = null; //NullPointerException// if(str.equals("男") 阅读全文
posted @ 2019-08-20 17:13 岁月蹁跹人知否 阅读(114) 评论(0) 推荐(0) 编辑
摘要: int num = b+c+d+e;System.out.println("会员卡号"+a+"各位之和:"+num);boolean result = num >20;if (result) {System.out.println("是");}elseSystem.out.println("否"); 阅读全文
posted @ 2019-08-20 17:07 岁月蹁跹人知否 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 强转 monney =(int) (double) int max = a >b?a>b;如果a>b 返回a String a = sc.next(); if (“y”.equals(a)) Java 三步走 1.编写代码 2. 编译代码 3. 运行 public class HelloWorld 阅读全文
posted @ 2019-08-20 17:07 岁月蹁跹人知否 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 1.空格 :System.out.println("a\tb\tc");System.out.println(a+"\t"+b+"\t"+c); 2.平均数 :double avg = (a + b + c)/3 连接符: "hello"+55 > "hello55"“hello”+5+55 》“h 阅读全文
posted @ 2019-08-20 17:06 岁月蹁跹人知否 阅读(121) 评论(0) 推荐(0) 编辑