自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

转载 实例3.7

class Example3_7 {  public static void main(String []args ) {   int sum = 0,i = 0,max = 8888,number = 7;   while(true) {    i++;    sum = sum+i;    if(sum>=max)     break;   }   System.out.pr

2013-04-15 19:45:40 435

转载 实例3.8

import java.util.*; class Example3_8 {  public static void main(String []args) {   int n,start,end,middle;   int a[] = {-2,1,4,5,8,12,17,23,45,56,90,100};   start = 0;   end = a.length;   middl

2013-04-15 19:45:00 507

转载 数组提升

class Promote {  public static void main(String[]args) {   int []t = {36,49,59,61,75,82,100};   promote(t);   view(t);  }  public static void view(int[] x) {   for(int i=0;i    System.out.prin

2013-04-15 19:44:13 414

转载 数组排列

class ArraySort {  public static void main(String[]args) {   int[]x = new int[]{49,78,95,20,25,63,100};   sort(x);   for(int i=0;i    System.out.println(x[i]);   }  }  public static void sort(

2013-04-15 19:40:38 404

转载 例子4.4

class Lader {  double above , height;  static double bottom;  void setAbove(double a ) {   above = a;  }  void setBottom(double b) {   bottom = b;  }  double getAbove() {   return above;  }

2013-04-15 19:34:27 399

翻译 实验3

abstract class Employee {    public abstract double earnings(); } class YearWorker extends Employee {  public double  earnings() {   System.out.println("1000");   return 0;  } } class MonthWo

2013-04-15 19:27:10 489

翻译 try-catch的例子应用

class Ed2 {  public static void main(String[]args) {   int ch = 0;   try {    ch = System.in.read();    if(ch != 'q') {     System.out.println((char)ch);    }    else {     return;    }   }

2013-04-15 19:24:31 436

翻译 求图形面积

class Trangle {  double sideA,sideB,sideC,length,area;  boolean boo;  public Trangle(double a,double b,double c) {   this.sideA = a;   this.sideB = b;   this.sideC = c;   if(a+b>c&&(a-b    boo

2013-04-15 19:18:41 488

转载 简单的方法重载

class People {  double getArea(double x,int y) {   return x*y;  }  int getArea(int x,double y) {   return (int)(x*y);  }  double getArea(float x,float y,float z) {   return (x*x+y*y+z*z)*2.0;

2013-03-29 21:42:53 402

转载 创建多个不同的对象

class Lader {  double above,bottom,height;  Lader(){}  Lader(double a,double b,double h) {   above = a ;   bottom = b;   height = h;  }  public void setAbove(double a) {   above = a ;  }  p

2013-03-29 21:40:01 565

翻译 四位随机验证码,如何做到更简洁??

class Validator {  public static void main(String[]args) {   System.out.println(getRandom());  }  public static int getRInt() {   return (int)(Math.random()*10);  }  public static char getRChar

2013-03-29 21:35:48 521

翻译 猜随机数字的java代码,还能改进吗??

class Guessnumber {  public static void main(String[]args) throws Exception {   int guess = (int)(Math.random()*21);   int ch = 0;   int input = 0;   int times = 0;   boolean isEnd = false;

2013-03-29 21:27:54 469

原创 输入几个整数求积

import java.util.*; class Hwork {  public static void main(String []args) {   Scanner reader = new Scanner(System.in);   int sum = 1;   int m = 0;   while(reader.hasNextInt()) {    int x = read

2013-03-07 23:01:22 918

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除