java中Color类的简单总结 1.颜色的常识 任何颜色都是由三原色组成(RGB),JAVA中支持224为彩色,即红绿蓝分量取值 介于0-255之间(8位表示) 2.Color类中的常量 public final static Color black = new Color(0,0,0); public final static Color bule = new Color(0,0,255); . . 有很多这样的常量,可供我们直接类名去调用而不需要去实例化. 3.Color中的构造函数 pu…
由PAT1017例题展开: Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have to wait in line behind the yellow line, until it is his/her turn to be s…
public interface Map<K,V> 将键映射到值的对象.一个映射不能包含重复的键:每个键最多只能映射到一个值. import java.util.HashMap; import java.util.Map; public class Test1 { public static void main(String[] args) { Map map = new HashMap();//声明一个Map map.put("s", "哈哈");//…