Java Reference
In-Depth Information
5. Use the assignment operator (=) to change the value of a variable.
6. All variables must be initialized before you access them.
7. Objects are entities in your program that you manipulate by calling methods.
71
72
8. A method is a sequence of instructions that accesses the data of an object.
9. A class defines the methods that you can apply to its objects.
10. The public interface of a class specifies what you can do with its objects. The
hidden implementation describes how these actions are carried out.
11. A parameter is an input to a method.
12. The implicit parameter of a method call is the object on which the method is
invoked.
13. The return value of a method is a result that the method has computed for use by
the code that called it.
14. A method name is overloaded if a class has more than one method with the same
name (but different parameter types).
15. The double type denotes floating-point numbers that can have fractional parts.
16. In Java, numbers are not objects and number types are not classes.
17. Numbers can be combined by arithmetic operators such as + , Ċ , and * .
18. Use the new operator, followed by a class name and parameters, to construct
new objects.
19. An accessor method does not change the state of its implicit parameter. A
mutator method changes the state.
20. Determining the expected result in advance is an important part of testing.
21. Java classes are grouped into packages. Use the import statement to use
classes that are defined in other packages.
Search WWH ::




Custom Search