摘要: 1 s和t不是引用的一样的 s引用SMALLt是LARGE s已经不是原始数据了 u是SMALL 2.原码:原码就是十进制数字最原始的二进制表示,在Java中,对于整数而言,其原码格式为最高位为符号位,该位上1表示负数而0表示正数,剩余位数为该数字的二进制表示。以Java中32位int型的整数2及- 阅读全文
posted @ 2020-09-29 21:14 陈涵 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1.要求三十个数 2.要求不重复 package yunsuan; import java.util.Random; public class yunsuan{ public static void main(String[]args) { int u=1; Random r=new Random( 阅读全文
posted @ 2020-09-29 20:30 陈涵 阅读(114) 评论(0) 推荐(0) 编辑
摘要: packag //信1905-2 陈涵 20194016 package ceshi; public class Account { private String accountID; private String accountname; private String operatedate; p 阅读全文
posted @ 2020-09-22 23:47 陈涵 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 1.例11.5引用保护成员 public class Cjava { public static void main(String[]args) { Student1 s1=new Student1(10010,"gabhs",'f',19,"fanog"); s1.show(); } } clas 阅读全文
posted @ 2020-08-31 11:21 陈涵 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 1.例11.1继承学生类 import java.util.Scanner; import java.util.*; public class Cjava { public static void main(String[]args) { Student1 s1=new Student1(); s1 阅读全文
posted @ 2020-08-30 19:56 陈涵 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 1.例13.1二次函数的解 import java.util.Scanner; public class Cjava { public static void main(String[]args) { float a,b,c,disc; System.out.println("input a,b,c 阅读全文
posted @ 2020-08-29 21:41 陈涵 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 1.例9.5引用静态数据成员 public class Cjava { public static void main(String[]args) { Box b[] = {new Box(12,15),new Box(18,20)}; System.out.println("h of b[0]=" 阅读全文
posted @ 2020-08-28 13:35 陈涵 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 1.例9.4对象数组的使用方法 public class Cjava { public static void main(String[]args) { Box b[] = {new Box(10,12,15),new Box(15,18,20),new Box(16,20,26)}; System 阅读全文
posted @ 2020-08-27 21:20 陈涵 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 1.例9.3 析构函数 public class Cjava { public static void main(String[]args) { Student s1=new Student(10010,"qi xi",'f'); s1.display(); Student s2=new Stude 阅读全文
posted @ 2020-08-26 20:18 陈涵 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 1.求长方体的体积要求类中用但参数的方法去求 public class Cjava { public static void main(String[]args) { Box b1=new Box(12,20,25); System.out.println("体积为:"+b1.volume()); 阅读全文
posted @ 2020-08-25 10:14 陈涵 阅读(100) 评论(0) 推荐(0) 编辑