摘要: class User { private String name; private String password; private static int count=0; public User() { count++; } public User(String name) { count++; 阅读全文
posted @ 2016-03-25 09:58 Xcode1003 阅读(221) 评论(1) 推荐(0) 编辑
摘要: class Dog{ private String name; private String color; private int age;public Dog(String name,String color,int age){ this.name=name; this.color=color; 阅读全文
posted @ 2016-03-25 09:37 Xcode1003 阅读(115) 评论(0) 推荐(0) 编辑
摘要: public class Employee { private int id;private String name;private double salary;private double byPercent; public Employee(int id,String name,double s 阅读全文
posted @ 2016-03-25 09:25 Xcode1003 阅读(285) 评论(0) 推荐(0) 编辑
摘要: class Address{ String country; String province; String city; String street; int post; public void tell(){ System.out.println("国家:"+country+",省份:"+prov 阅读全文
posted @ 2016-03-14 20:56 Xcode1003 阅读(225) 评论(0) 推荐(0) 编辑
摘要: public class JieCheng{ public static void main(String[] args){ int i=0; double a=1; double sum=0; for(i=1;i<=20;i++){ a=a*i; sum+=a; } System.out.prin 阅读全文
posted @ 2016-03-14 20:15 Xcode1003 阅读(1127) 评论(0) 推荐(0) 编辑
摘要: public class ZhengChu { public static void main(String args[]) { int i=0; for(i=1;i<=1000;i++){ if(i%3==0 && i%5==0 && i%7==0){ System.out.println(i); 阅读全文
posted @ 2016-03-14 19:17 Xcode1003 阅读(307) 评论(0) 推荐(0) 编辑
摘要: public class HeDeZhi { public static void main(String args[]) { int x=0, i=0; int sum=0; for (i=1;i<=100;i++){ if (i%2==0) x=-(i*10+3); else x=i*10+3; 阅读全文
posted @ 2016-03-14 18:47 Xcode1003 阅读(111) 评论(0) 推荐(0) 编辑
摘要: public class ShuiXianHuaShu { public static void main(String[] args){ for(int i=1;i<=10000;i++){ int gewei,shiwei,baiwei,qianwei,wanwei; wanwei=i/1000 阅读全文
posted @ 2016-03-14 18:05 Xcode1003 阅读(355) 评论(0) 推荐(0) 编辑
摘要: public class DataDemo07{ public static void main(String[] args){ boolean flag=true; System.out.println("flag="+flag); }} 阅读全文
posted @ 2016-03-06 16:51 Xcode1003 阅读(92) 评论(0) 推荐(0) 编辑
摘要: public class DataDemo06{ public static void main(String[] args){ float num=3.0f; System.out.println("两个小数相乘:"+num*num); }} 阅读全文
posted @ 2016-03-06 16:48 Xcode1003 阅读(94) 评论(0) 推荐(0) 编辑