11.1 Overview of Physical Storage MediaStorage media are classified by the speed with which data can be accessed, by the cost per unit of data to buy the medium, and by the medium's reliability.Cache:... Read More
posted @ 2010-09-17 22:46 露初晞 Views(130) Comments(0) Diggs(0)
class ManagerextendsEmployee{addedmethodsandfields}The keyword extends indicates that you are making a new class that derives from an existing class. The existing class is called the superclass, base ... Read More
posted @ 2010-09-16 22:55 露初晞 Views(230) Comments(0) Diggs(0)
Always keep data private.This is first and foremost: doing anything else violates encapsulation. You may need to write an accessor or mutator method occasionally, but you are still better off keeping ... Read More
posted @ 2010-09-13 13:41 露初晞 Views(172) Comments(0) Diggs(0)
The main reason for using packages is to guarantee the uniqueness of class names.Static ImportsFor example, if you add the directiveto the top of your source file, then you can use static methods and ... Read More
posted @ 2010-09-13 13:31 露初晞 Views(198) Comments(0) Diggs(0)
Calling Another ConstructorIf the first statement of a constructor has the form this(. . .), then the constructor calls another constructor of the same class. Here is a typical example:When you call n... Read More
posted @ 2010-09-13 13:11 露初晞 Views(169) Comments(0) Diggs(0)
Static FieldsIf you define a field as static, then there is only one such field per class. In contrast, each object has its own copy of all instance fields.class Employee{ . . . private int id; privat... Read More
posted @ 2010-09-13 12:36 露初晞 Views(275) Comments(0) Diggs(0)
Employee类The simplest form for a class definition in Java is:classClassName{constructor1constructor2. . .method1method2. . .field1field2. . .}We adopt the style that the methods for the class come fir... Read More
posted @ 2010-09-12 20:25 露初晞 Views(209) Comments(1) Diggs(0)
Date类Constructors always have the same name as the class name. Thus, the constructor for the Date class is called Date. To construct a Date object, you combine the constructor with the new operator, a... Read More
posted @ 2010-09-12 18:52 露初晞 Views(2347) Comments(0) Diggs(0)
EPIsqrt()abs()sin()cos()tan()toRadians(x)  把x由角度值转化为弧度值toDegree(x)   把x由弧度值转化为角度值log()log10()exp()pow()cbrt()      立方根asin()acos()atan()random()     在区间[0,1)上随机提取一个实数sinh()cosh()tanh() Read More
posted @ 2010-09-11 19:46 露初晞 Views(121) Comments(0) Diggs(0)
int length(); 返回字符串的长度(包括字符的数量),该函数不需要参数。char charAt(int index); 返回字符串中第index个编号对应的字符(编号从0开始)。int compareTo(String another); 判断两个字符串是否相同,相同则返回0.int compareToIgnoreCase(String str); 判断两个字符串在忽略字母大小写时是否相... Read More
posted @ 2010-09-11 15:06 露初晞 Views(166) Comments(0) Diggs(0)