04 2021 档案

摘要: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)
摘要:package operator;import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;public class Demo04 { //自增自减运算符 ++ -- 一元运算符 public static void main(String[] 阅读全文
posted @ 2021-04-21 14:21 杨得体 阅读(146) 评论(0) 推荐(0)
摘要:package operator;public class Demo01 { public static void main(String[] args) { //二元运算符 //ctrl + D : 复制当前行到下一行 int a = 10; int b = 20; int c = 25; int 阅读全文
posted @ 2021-04-21 13:56 杨得体 阅读(246) 评论(0) 推荐(0)
摘要:import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;import java.sql.SQLOutput;public class Demo5 { //常量与命名规范 //常量 需要 见名知意 //局部变量、方法名:首字母小写 阅读全文
posted @ 2021-04-21 13:26 杨得体 阅读(318) 评论(0) 推荐(0)
摘要:public class Demo4 { //变量 //类变量 static static double salary = 2500; //实列变量:从属于对象;如果不自行初始化,这个类型的默认值为 0 0.0 //布尔值:默认是false //除了基本类型,其余的默认值都是null String 阅读全文
posted @ 2021-04-21 13:12 杨得体 阅读(52) 评论(0) 推荐(0)
摘要:public class Demo3 { //类型转换的溢出问题 public static void main(String[] args) { //操作比较大的数时,注意溢出问题 //JDK7新特性,数字之间可以用下划线分割 int money = 10_0000_0000; int year 阅读全文
posted @ 2021-04-21 12:05 杨得体 阅读(66) 评论(0) 推荐(0)
摘要:public class Demo1 { public static void main(String[] args) { int i = 10;//十进制 int i2 = 010;//八进制0 int i3 = 0x10;// 十进制0x System.out.println(i); Syste 阅读全文
posted @ 2021-04-21 10:40 杨得体 阅读(52) 评论(0) 推荐(0)
摘要:Markdown学习 标题: 二级标题 三级标题 四级标题 字体 hollow world! hollow world! hollow world! hollow world! 引用 选择狂神说Java 走向人生巅峰 分割线 图片 超链接 点击跳转到狂神博克 列表 A C D A B C 表格 名字 阅读全文
posted @ 2021-04-18 11:28 杨得体 阅读(26) 评论(0) 推荐(0)