摘要: package zuoye; class Person{ private String name; private static int count; public Person() { count++; System.out.println("产生了" + count + "个实例化对象"); } public Strin... 阅读全文
posted @ 2017-12-18 15:03 安静惠 阅读(153) 评论(0) 推荐(0) 编辑
摘要: public class we { public static void main(String[] args) { int[] arr=new int[30]; arr[0]=1; arr[1]=1; for(int i=2;iarr[j]) { int temp; ... 阅读全文
posted @ 2017-11-27 11:43 安静惠 阅读(166) 评论(1) 推荐(0) 编辑
摘要: package sy; public abstract class Person { private String name; private int age; public String getName() { return name; } public void setName(String name) { this.... 阅读全文
posted @ 2017-11-19 20:16 安静惠 阅读(141) 评论(0) 推荐(0) 编辑
摘要: package cn.ch.w; public abstract class A { public abstract void fun(); } package cn.ch.w; public class B extends A{ public void fun(){ System.out.println("嗨!你好小蘑菇!!"); } }... 阅读全文
posted @ 2017-11-19 20:12 安静惠 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 1 package cn.ch.w; public class StaticDemo { public static void main(String args[]) { new StaticDemo().fun(); } private void fun() { // TODO 自动生成的方法存根 System.o... 阅读全文
posted @ 2017-11-13 11:50 安静惠 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1 package kk; public class circle { private double radius; // 构造方法,有参构造 public circle(double radius) { this.radius = radius; } //方法的重载,参数不同 ... 阅读全文
posted @ 2017-11-13 11:45 安静惠 阅读(230) 评论(0) 推荐(0) 编辑
摘要: static属性和方法如何调用: 构造方法私有化(饿汉式) 空参构造自动命名(有参构造) 空参构造输出个数 static关键字 子父类 阅读全文
posted @ 2017-11-06 13:26 安静惠 阅读(171) 评论(1) 推荐(0) 编辑
摘要: package asd; import com.rupeng.game.GameCore; public class ty implements Runnable { public static void main(String[] args){ GameCore.start(new ty()); } public void run() { ... 阅读全文
posted @ 2017-11-06 13:12 安静惠 阅读(191) 评论(0) 推荐(0) 编辑
摘要: package cn.person.www; public class Prson { public int id; public String name; public int age; public String city; public String introduce() { return "我是" + id + "... 阅读全文
posted @ 2017-11-06 12:33 安静惠 阅读(240) 评论(0) 推荐(0) 编辑
摘要: package cn.wzx.www; import java.util.Scanner; public class AdditionQuiz { public static void main(String[] args) { // TODO 自动生成的方法存根 int number1=(int)(System.currentTimeMillis(... 阅读全文
posted @ 2017-10-23 10:54 安静惠 阅读(762) 评论(0) 推荐(0) 编辑