自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(23)
  • 资源 (1)
  • 收藏
  • 关注

原创 找回Linux系统root用户密码

Linux系统root用户密码忘记。第一步:重启系统(reboot -n),进入开机界面按下enter键,进入下图。第二步:选择内核,按下“e”键位,进入下图模式。第三步:选择启动模式“1”,如下图。第四步:修改root用户密码,然后重启,如下图。...

2021-02-10 11:22:39 86

原创 面向对象-练习-2021-02-02-01

package com.user.learn1;import org.junit.Test;public class OOPTest1 { @Test public void testA() { A a = new A(); a.show(); B b = new B(); a.a = 2; a.show(); b.show(); b.a = 5; b.show(); } @Test public void testPerson() { Person

2021-02-02 20:13:49 133

原创 面向对象-练习-2021-01-31-01

package com.user.test4;import org.junit.Test;public class OopTest1 { @Test public void testStudent() { Student stu = new Student("张三", "男性", 21, 1001, 89); System.out.println(stu.say()); stu.setGender("女性"); System.out.println(stu.say()); }

2021-01-31 19:21:24 151 1

原创 异常处理-练习-2021-01-24-01

package com.user.learn;/** * 编写应用程序EcmDef.java,接收命令行的两个参数,要求不能输入负数,计算 两数相除。对 数 据 类 型 不 一 致 * (NumberFormatException) 、 缺 少 命 令 行 参 数 (ArrayIndexOutOfBoundsException、 * 除0(ArithmeticException)及输入负数(EcDef 自定义的异常)进行异常处理。 * * @author Administrator *

2021-01-24 20:59:29 114

原创 abstractl练习-JAVA-2021-01-19-01

package com.user.test3;public class Manager extends Employee { private double bonus; public Manager(double bonus) { super(); this.bonus = bonus; } public Manager(String name, int id, double salary, double bonus) { super(name, id, salary);

2021-01-19 15:56:55 87

原创 单例设计模式-JAVA-2021-01-17-03

package com.user.exer;import org.junit.Test;/** 单例设计模式应用场景 * 网站的计数器,一般也是单例模式实现,否则难以同步。  * 应用程序的日志应用,一般都使用单例模式实现,这一般是由于共享的日志 文件一直处于打开状态,因为只能有一个实例去操作,否则内容不好追加。  * 数据库连接池的设计一般也是采用单例模式,因为数据库连接是一种数据库 资源。  * 项目中,读取配置文件的类,一般也只有一个对象。没有必要每次使用配置 文件数据,都生

2021-01-17 21:46:14 76

原创 static-练习-JAVA-2021-01-17-02

package com.user.exer;public class Account { private int id; private String passward = "000000"; private double balance; private static double interestRate; private static double miniMoner = 1.0; private static int init = 1001; public Account()

2021-01-17 20:44:15 66

原创 包装类-练习-2021-01-17-01

package com.user.exer;import java.util.Scanner;import java.util.Vector;public class ScoreTest { public static void main(String[] args) { Scanner scan = new Scanner(System.in); Vector v = new Vector(); int max = 0; for (;;) { System.out.pr

2021-01-17 15:07:17 89 1

原创 多态-练习-JAVA-2021-01-16-01

package com.user.test2;public class GeometricObject { protected String color; protected double weight; protected GeometricObject(String color, double weight) { this.color = color; this.weight = weight; } public String getColor() { return col

2021-01-16 19:30:22 80

原创 继承-练习-JAVA-2021-01-15-01

package com.user.test1;public class Account { private int id; private double balance; private double annualInterestRate; public Account(int id, double balance, double annualInterestRate) { super(); this.id = id; this.balance = balance; this.

2021-01-15 16:06:34 86 1

原创 练习-JAVA-2021-01-14-01

package com.user.practise;public class test1 { public static void main(String[] args) { printnumber num = new printnumber(); num.setNumber1(100); System.out.println("打印1~100以内13的倍数"); num.printN(); System.out.println(); System.out.println("绘

2021-01-14 09:09:13 161

原创 练习-JAVA-2021-01-12

package com.user.practise;public class test { public static void main(String[] args) { Demo demo = new Demo(-1, 0); String x = demo.demo1(); System.out.println("M= " + demo.getM() + "\tN= " + demo.getN() + "\t" + x); System.out.println("********

2021-01-12 23:08:07 103

原创 this-练习-JAVA-2021-01-10-01

package com.user.test;public class BoyTest { public static void main(String[] args) { Boy boy1 = new Boy("Tom", 22); boy1.shout(); System.out.println("*********"); Girl girl1 = new Girl("rose", 21); girl1.marry(boy1); System.out.println("***

2021-01-10 20:06:24 93 1

原创 构造器-JAVA-2021-01-09-03

package com.user.test;public class Person1 { public static void main(String[] args) { Person2 pers1 = new Person2(); System.out.println("name = " + pers1.getname() + " , age = " + pers1.getage()); System.out.println("***************"); Person2 p

2021-01-09 22:47:54 61 1

原创 封装-JAVA-2021-01-09-02

package com.user.test;//封裝public class AnimalTest { public static void main(String[] args) { Animal test = new Animal(); test.name = "熊貓"; test.setage(9); test.setlegs(4); test.show(); int showlegs = test.getlegs(); System.out.println("sh

2021-01-09 21:37:06 211 1

原创 递归-练习-java-2021-01-09-01

package com.user.test;//递归public class SumNumber { public static void main(String[] args) { SumNumber test = new SumNumber(); int rest1 = test.sum1(100); int rest2 = test.sum2(100); System.out.println(rest1); System.out.println(rest2); int

2021-01-09 18:01:56 66

原创 实参与形参加小练习-JAVA-2021-01-07-02

package com.user.test;//实参与形参public class ValueTransTest01 { public static void main(String[] agrs) { ValueTransTest01 test = new ValueTransTest01(); int m = 10; int n = 11; System.out.println("m=" + m + "\tn=" + n); System.out.println("函数调用")

2021-01-07 17:49:36 95

原创 方法的重载-JAVA-2021-01-07-01

package com.user.test;//重载方法public class OverLoadTest { public static void main(String[] agrs) { OverLoadTest a = new OverLoadTest(); int a1 = a.mOL(2); System.out.println("2的平方:"+a1); int a2 = a.mOL(2, 3); System.out.println("2乘以3等于:"+a2);

2021-01-07 15:21:48 336

原创 面向对象-练习-2021-01-07-01

package com.user.test;public class ArraryUtilTest { public static void main(String[] args) { ArraryUtil util = new ArraryUtil(); int[] arr = new int[] { 11, 22, 10, 4, 88, 9, 0, 31, 56, -11, 78, 69, 79, -1 }; int max = util.getMax(arr); System.o

2021-01-07 09:15:55 59

原创 面向对象-练习-2021-01-06-01

package com.user.test;public class StudentTest02 { public static void main(String[] args) { Studet1[] stud = new Studet1[10]; for (int i = 0; i < stud.length; i++) { stud[i] = new Studet1(); stud[i].number = i + 1; stud[i].state = (int)

2021-01-06 14:10:59 86 1

原创 java练习-2021-01-05-01

package com.user.contact;public class Test001 { public static void main(String[] args) { char x = 'x'; int i1 = 10; System.out.println(true ? x : i1); System.out.println(true ? 'x' : 10);//连续工作66小时,编程计算共多少天零多少小时? int hour = 66; int day = ho

2021-01-05 16:17:38 144

原创 面向对象-2021-01-04-01

package com.user.contact;public class PersonTest { public static void main(String[] args) {// 创建类对象 Person p1 = new Person();// 使用类的属性和方法 p1.name = "hao"; p1.age = 22; p1.isMale = true; System.out.println(p1.name); System.out.println(p1.

2021-01-04 22:54:10 149 1

原创 冒泡排序

在这里插入代码片@TOCpackage com.user.contact;public class BubbleSortTest {public static void main(String[] args) {int[] arr = new int[] { 43, 12, 21, 22, 55, 11, 77, 0, 66, 9, 19 };// 冒泡排序for (int i = 0; i < arr.length -1; i++) {for (int j = 0; j < a

2021-01-04 21:45:08 88

GNS学习组网的模拟软件

软件 可以模拟交换机 路由器 的组网的实验!个人感觉不错!

2013-07-08

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除