Core Java- concept Chapter
If you need to know which Unicode characters belong to the Java alphabet, you can use the Javaidentifierstart and Javaidentifierpart methods of the Charactor class to detect
Const is a reserved word for Java, but it is not currently used
An integer that is 0 apart will produce an exception and the floating-point number is 0 to get Infinity or NaN
Strictfp --java keyword. (The default way is not to overflow, the strict way can produce overflow) strictfp, that is, strict float point (precise floating-point).
The STRICTFP keyword can be applied to a class, interface, or method. When declaring a method using the STRICTFP keyword, all float and double expressions in the method strictly adhere to the fp-strict limit and conform to the IEEE-754 specification. When you use the STRICTFP keyword on a class or interface, all the code in that class, including the initial values and code in the nested type, is strictly evaluated.
Public STRICTFP class MyClass
The break label label must be placed in thethe outermostLoop can also be used before the
Large Value: Biginteger.valueof BigDecimal Java does not have operator overloading features
Arrays.sort () Fast sorting after optimization
The class library designer separates the save time from the name given to the point in time. The Standard class library contains the following two classes: one is used to represent the point of timeDateClass, the second is used to express the familiar calendar notationGregorianCalendarClass. In factGregorianCalendarClass extends a more general Calendar class, which describes the calendar-like attributes, theoretically extending the Calendar class to implement the Chinese lunar calendar, but only the Gregorian calendar is implemented in the standard class library. Separating the time from the calendar is a good object-oriented design. Date.before (). After () New GregorianCalendar (2011, 9, 1); 9 Expression October
Java has the equivalent of the UNIX make tool Javac Emptest.java if found to use the Emp.java, will automatically find a file named Emp.class, if not found this file, will automatically search Emp.java off to compile it.
Method overrides, JDK5 previously required the return type to be the same, JDK5 later allowing subclasses to define the return type of the override method as a subtype of the original return type
Searching every time you invoke a method can be inefficient, so the virtual machine creates a method table for each class in advance.
In the object class, the Clone method is declared as protected, so it cannot be called directly, and the subclass must redefine the Clone method and declare it public so that all methods can clone the object. The Cloneable interface is one of several markup interfaces (tagging interface) provided by Java. The markup interface has no method, and the only purpose of using it is to useinstanceofFor type checking, if (obj instanceof cloneable) In previous versions of Jdk5, the Clone method always returns the object type and, after Jdk5, allows the clone method to be declared public. If the Cloneable interface is not implemented, the exception will be clonenotsupportexception
try {} catch (SQLException e) {throwable se = new Servletexception ("sdddddd"); Se.Setcause(SE); Throw SE; ///When an exception is caught, you can use throwable e = Se.getcause () to get the original exception//If a checked exception appears in a method and is not allowed to throw it, then the wrapper technique is very useful and we can catch this checked exception. and wrap it into a run-time exception.
jaVa-verbose: Class
To view the details of the JVM load class
jaVa-verbose: GC View details of the garbage collector (garbage Collector) in the JVM