雕刻时光

just do it……nothing impossible
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年9月26日

摘要: View Code //第七题import java.util.*;class Vehicle{ protected int speed, kind; protected String color; Scanner cin=new Scanner(System.in); public Vehicle(int a){ //不带参数的构造方法 kind=a; System.out.println("构造完成"); } public void setSpeed(int a){ speed=a; } public vo... 阅读全文

posted @ 2011-09-26 21:00 huhuuu 阅读(1058) 评论(0) 推荐(0) 编辑

摘要: View Code import java.util.*;import java.math.*;import java.text.DecimalFormat;public class Main { public static void main(String args[]) { Scanner cin=new Scanner(System.in); double x1,y1,x2,y2; DecimalFormat df = new DecimalFormat("0.00"); while... 阅读全文

posted @ 2011-09-26 15:07 huhuuu 阅读(698) 评论(0) 推荐(0) 编辑

摘要: View Code class Point{ protected int x, y; // coordinates of the Point public Point(){ //不带参数的构造方法 x=0; y=0; System.out.println( "Point constructor: "+this.toString() ); } public Point(int a,int b){ //带参数的构造方法 x=a; y=b; System.out.println( "Point con... 阅读全文

posted @ 2011-09-26 14:30 huhuuu 阅读(526) 评论(0) 推荐(0) 编辑