JDK API Documentation
Java SE 8 API documentation:
Http://www.oracle.com/technetwork/java/javase/documentation/jdk8-doc-downloads-2133158.html
Jdk-8-apidocs Online version:
Http://docs.oracle.com/javase/8/docs/api/index.html
Java SE 7 API documentation:
Http://www.oracle.com/technetwork/java/javase/documentation/java-se-7-doc-download-435117.html
Java SE 6 API documentation:
Http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-doc-download-355137.html
Java Platform standard Edition 8 documentation
http://docs.oracle.com/javase/8/docs/
environment variable Settings
If a constant is declared public, the method for other classes can also use this constant.
In this example, constants2.cm_per-inch is such a constant.
-
- class file name of public class
- Java is able to access class member variables through instances
- Local variables (except for formal parameters, parameter initialization is done by method calls) require display initialization, no access before initialization
- The local variable in the method has the same name as the member variable, then the member variable is accessed using the instance or object in the method
Methods of variable parameters
1. Definition of variable length parameters
use ... Represents variable-length parameters , such as
Print (String ... args) {
...
}
In a method with variable length parameters, parameters can be used as arrays, for example, all parameter values can be looped out.
Print (String ... args) {
for (String Temp:args)
SYSTEM.OUT.PRINTLN (temp);
}
2. Invocation of a variable-length parameter method
Any number of arguments can be given at the time of invocation and no arguments can be given, for example:
Print ();
Print ("Hello");
Print ("Hello", "Lisi");
Print ("Hello", "Zhang San", "Alexia")
Polymorphic
When assigning a subclass object to a reference of a parent class, the compile-time type is the parent class, and the runtime behaves as a subclass attribute. So the call to the parent class may appear to be not its own definition of the characteristics of the situation, so called polymorphic, finally understand, hahaha.
"8-19" Java Learning Note 01