?? color.java
字號:
class Color{
int red;
int green;
int blue;
public Color(int red,int green,int blue){
this.red=red;
this.green=green;
this.blue=blue;
}
public void setRed(int red){
this.red=red;
}
public void setGreen(int green){
this.green=green;
}
public void setBlue(int blue){
this.blue=blue;
}
public void display(){
System.out.println("red:"+red);
System.out.println("green:"+green);
System.out.println("blue:"+blue);
}
/*
//copy constructor
public Color(Color other){
red=other.red;
green=other.green;
blue=other.blue;
}
//clone method
public Color clone(){
Color obj=null;
try{
obj=(Color)super.clone();
}
catch(Exception e){
e.printStackTrace();
obj=null;
}
return obj;
//return new Color(red,green,blue);
}
*/
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -