摘要: public class juxing { juxing(){ chang=1; kuan=1; } double chang; double kuan; double mianji(){ return (chang*kuan); } public static void mian(String [ 阅读全文
posted @ 2016-03-05 08:23 storm47 阅读(188) 评论(0) 推荐(0)
摘要: public class bird{ //创建类。 bird; String color ; double weight ; //定义属性,定义该属性的数据类型。可以被接下来在这类中创建的对象引用,并赋值; void fly(){ System.out.println("我能飞"); }//定义的方 阅读全文
posted @ 2016-03-04 08:43 storm47 阅读(115) 评论(0) 推荐(0)
摘要: String a="mingrihaijideJAVAbu"; char b[] = new char[a.length()]; for(int i=0;i<a.length();i++){ b[i]=a.charAt(i); } int e=0; for(char c:b){ if(c=='i') 阅读全文
posted @ 2016-03-01 16:41 storm47 阅读(200) 评论(0) 推荐(0)
摘要: public class 字符串 { static int i=0; public static void main (String ages[]){ final String a="字符串常量"; String b="字符串常量"; //String s=new String("字符串常量");/ 阅读全文
posted @ 2016-03-01 08:15 storm47 阅读(160) 评论(0) 推荐(0)
摘要: //直接赋值 int a []={2,3,4}; System.out.println(a[0]); //先赋予长度 int b[]=new int [10]; //赋值 for(int i=0;i<10;i++){ b[i]=i; } System.out.println(b[3]); //获取数 阅读全文
posted @ 2016-02-29 08:17 storm47 阅读(193) 评论(0) 推荐(0)
摘要: //菱形x1 int x=0; int x1=0; for(int i=0;i<5;i++){ for(int j=0;j<10;j++){ x=5+i; x1=5-i; if(j>=x1&&j<=x){System.out.print ("*");} else{System.out.print(" 阅读全文
posted @ 2016-02-27 08:25 storm47 阅读(107) 评论(0) 推荐(0)
摘要: for(double i=0;i<=50;i++){ for(double j=0;j<=100;j++){ for(double x=0;x<=100;x++){ if(100==i*3+j*2+x/2&&100==x+i+j) { System.out.println("大马"+i+"中马"+j 阅读全文
posted @ 2016-02-26 08:19 storm47 阅读(104) 评论(0) 推荐(0)
摘要: Scanner a=new Scanner(System.in); System.out.println("请输入数字"); int b=a.nextInt(); if(b%2==0) { System.out.println("您输入的是偶数"); } else { System.out.prin 阅读全文
posted @ 2016-02-24 19:39 storm47 阅读(182) 评论(0) 推荐(0)
摘要: 越来越懒了。 越来越懒。 越来越。 阅读全文
posted @ 2016-02-23 08:26 storm47 阅读(124) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2016-02-22 08:19 storm47 阅读(128) 评论(0) 推荐(0)