nini1  

2016年8月23日

摘要: public class TheSecond { public static void main(String[] args) { int count = 0; Scanner input =new Scanner(System.in); System.out.println("请输入一串字符"); 阅读全文
posted @ 2016-08-23 21:25 nini1 阅读(233) 评论(0) 推荐(0)

2016年8月21日

摘要: 自己的第一个小程序 ps:书是在集合里面后面文件处理的有一点小问题,希望有人会给点意见 //客户类 import java.io.Serializable; public class Customer implements Serializable{ //客户的属性 private String n 阅读全文
posted @ 2016-08-21 21:02 nini1 阅读(2301) 评论(0) 推荐(1)
 
摘要: public class StringUse { public static void main(String[] args) { int count = 0; String s=new String("hello!"); String b="hello"; String c="abcde"; St 阅读全文
posted @ 2016-08-21 20:49 nini1 阅读(139) 评论(0) 推荐(0)

2016年8月17日

摘要: public class Five_05 { public static void main(String[] args) { Scanner input=new Scanner(System.in); System.out.println("输入学习成绩:"); double d=input.ne 阅读全文
posted @ 2016-08-17 14:03 nini1 阅读(368) 评论(0) 推荐(0)

2016年8月14日

摘要: public class Four_04 { public static void main(String[] args) { Scanner input=new Scanner(System.in); System.out.println("请输入一个正整数:"); int a=input.nex 阅读全文
posted @ 2016-08-14 20:13 nini1 阅读(800) 评论(0) 推荐(0)
 
摘要: TreeSet:如果要对对象进行排序,对象类要实现Comparable接口! TreeMap:如果要对对象进行排序,对象类要实现Comparable接口! 下面是我自己写的小程序主要传输对象 public class News implements Comparable<News>{ //news为 阅读全文
posted @ 2016-08-14 19:04 nini1 阅读(122) 评论(0) 推荐(0)

2016年8月9日

摘要: Artist a;//父类对象但没构建 a=new PianoArtist;//父类引用子类对象(损失自己的属性,方法) a.make();//调用子类重写的方法 (向上转型:由子类转向父类,调用的方法是子类的,方法必须是子类重写的,自己声明的方法,属性已经丢失了) PianoArtist b=ne 阅读全文
posted @ 2016-08-09 22:01 nini1 阅读(128) 评论(0) 推荐(0)
 
摘要: public class Three_03 { public static void main(String[] args) { for(int i=100;i<1000;i++){ int a=i%10; int b=i/10%10; int c=i/100; if((a*a*a+b*b*b+c* 阅读全文
posted @ 2016-08-09 21:57 nini1 阅读(1392) 评论(0) 推荐(0)

2016年8月8日

摘要: public class PrimeNumber { public static void main(String[] args) { int count=0; for(int i=101;i<201;i++){ for(int j=2;j<=i;j++){//外边循环一次里面循环一遍 if(i%j 阅读全文
posted @ 2016-08-08 21:41 nini1 阅读(163) 评论(0) 推荐(0)
 
摘要: 程序分析: 兔子的规律为数列1,1,2,3,5,8,13,21.... public class One_01 { public static void main(String[] args) { int robot01=0; int robot02=1; for(int i=1;i<10;i++) 阅读全文
posted @ 2016-08-08 21:21 nini1 阅读(3066) 评论(0) 推荐(0)