摘要: import java.util.Scanner;import java.util.jar.JarOutputStream;public class sc { public static void main(String[] args) { String name = "张三"; String ps 阅读全文
posted @ 2021-05-14 17:08 杨得体 阅读(54) 评论(0) 推荐(0)
摘要: package Class;public class StudentA { String strName; public String getName(){ return strName; } public void setName(String name){ strName = name; } p 阅读全文
posted @ 2021-04-26 15:11 杨得体 阅读(84) 评论(0) 推荐(0)
摘要: package Class;public class Ca { int a; static int b; public static void m1(){ Ca ca = new Ca(); ca.a = 10; b = 10; } public void m2(){ a = 5; b = 5; } 阅读全文
posted @ 2021-04-26 15:10 杨得体 阅读(53) 评论(0) 推荐(0)
摘要: package Class;public class MyPlus { public int plus(int a, int b){ int s; s = a + b; return s; } public int plus(int a ,int b,int c){ int s; s = plus( 阅读全文
posted @ 2021-04-26 15:09 杨得体 阅读(80) 评论(0) 推荐(0)
摘要: package scanner;import java.util.Scanner;public class Demo03 { public static void main(String[] args) { //累加程序 //可输入多个数字,求总和和平均值,每输入一个数字用回车确认,通过非数字来结束 阅读全文
posted @ 2021-04-24 14:58 杨得体 阅读(287) 评论(0) 推荐(0)
摘要: package scanner;import java.util.Scanner;public class Demo01 { public static void main(String[] args) { //创造一个扫描对象,用于接收键盘数据 Scanner scanner = new Scan 阅读全文
posted @ 2021-04-23 14:43 杨得体 阅读(110) 评论(0) 推荐(0)
摘要: package operator;public class Demo08 { public static void main(String[] args) { //三元运算符 x ? y : z // 如果 x = true 则 y 否则 z int score = 60; String type 阅读全文
posted @ 2021-04-23 14:03 杨得体 阅读(90) 评论(0) 推荐(0)
摘要: package operator;public class Demo07 { public static void main(String[] args) { //字符串连接符 + int a = 10; int b = 20; a += b;//a = a + b System.out.print 阅读全文
posted @ 2021-04-23 13:51 杨得体 阅读(94) 评论(0) 推荐(0)
摘要: package operator;public class Demo06 { //位运算 public static void main(String[] args) { /* A = 0011 1100 B = 0000 1101 A&B 0000 1100 A|B 0011 1101 A^B 0 阅读全文
posted @ 2021-04-21 14:42 杨得体 阅读(50) 评论(0) 推荐(0)
摘要: package operator;public class Demo05 { //逻辑运算符 public static void main(String[] args) { boolean a = true; boolean b = false; System.out.println("a && 阅读全文
posted @ 2021-04-21 14:33 杨得体 阅读(60) 评论(0) 推荐(0)