摘要: 编写一个Java应用程序,该应用程序包括2个类:Print类和主类E。Print 类里有一个方法output()功能是输出100 ~ 999之间的所有水仙花数(各位数字的 立方和等于这个三位数本身,如: 371 = 33 + 73 + 13。)在主类E的main方法中来 测试类Print。 阅读全文
posted @ 2016-09-15 21:48 庚庚庚庚庚辰 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 编写Java应用程序。首先,定义描述学生的类——Student,包括学号(int)、 姓名(String)、年龄(int)等属性;二个方法:Student(int stuNo,String name,int age) 用于对对象的初始化,outPut()用于输出学生信息。其次,再定义一个主类—— T 阅读全文
posted @ 2016-09-15 20:46 庚庚庚庚庚辰 阅读(126) 评论(0) 推荐(0) 编辑
摘要: String String str ="abc"; (字符串常量) str = "def"; (指向新的字符串) String str1 =new String(“tom”); String str2 =str1; str1 =“rose”; (把新的字符串地址赋给str1) 输出结果 char[] 阅读全文
posted @ 2016-09-14 16:50 庚庚庚庚庚辰 阅读(187) 评论(0) 推荐(0) 编辑
摘要: int [] a1= new int[5]; int []a2= new int[5]; for(int i=0;i<9;i++) { for(int j=i;j<9;j++) { if(a1[i]>a2[j+1]) { int zhong =a1[i]; a1[i]=a2[j+1]; a2[j+1 阅读全文
posted @ 2016-09-14 13:56 庚庚庚庚庚辰 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-09-14 13:44 庚庚庚庚庚辰 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-09-12 22:21 庚庚庚庚庚辰 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-09-12 21:08 庚庚庚庚庚辰 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-09-12 21:00 庚庚庚庚庚辰 阅读(578) 评论(0) 推荐(0) 编辑
摘要: 手打的笔记: () 内的则为注意事项或者提示 public static void main (String[] args) ******(用一个方法)****{ int i = 10; int j =20; System.out.println(i == j); 与 并且关系: System.ou 阅读全文
posted @ 2016-09-12 16:53 庚庚庚庚庚辰 阅读(493) 评论(0) 推荐(0) 编辑