Hope to summarize these knowledge points will help with friends who are preparing to pass the SCJP exam! It is inevitable that there is a wrong place to welcome everyone to criticize.
The Thread class is defined in the java.lang package, Sleep () and Yield () are the static method of Thread. But Wait (), Notify (), NotifyAll () is an instance method of the Object class. To let a thread start to call the start () method, how specifically, what time thread starts running is related to the operating system and virtual machine. I have to remember that the String class is not modified, but don't think that call some methods will create a new object. When calling the concat (), TRIM (), TouPpercase (), TOLOWERCASE () method of the String instance, if the instance has not changed, the object will not be created. Run the following program to get the four TRUE, explain this. Public class teststring {? public static void main (string [] args)? {?? Teststring TS = new teststring (); ?? ts.test (); ??} ??? public void test ()? {?? String Lower = "mingjava"; ?? String Upper = "mingjava"; ???? system.out.println (lower == Lower.tolowerCase ()); ?? system.out.println (Upper == Upper.touppercase ()); ?? System.out.println (Lower == Lower.trim ()); ?? System.out.println (Lower == Lower.Concat ("));?}} All exceptions inherit From throwable, its two branches are Error and Exception. Error and RuntimeExcepton are joined as UnchecKedException. Other abnormalities are called CheckedException. Error and RuntimeException are no need to capture, Error we can't force, but RuntimeException appears is your error, you should check your code. If you don't use the throws declaration in the method CheckedException, then you will have compilation errors. Remember that the subscript of the array starts from the start 0, sometimes in main (String [] args) inside you (String [] args) inside your internal class has unlimited access to its Enclosing Class, and even access his private type variable . But if the internal class wants to access local variables, then this partial variable must be final. For example, public class test {? Public void dosome ()? {?? final int j = 100; ??????? Class InnerClass ?? {???????? public void print () ???? ?? {?????????? system.out.println (j); ??????} ????} ??}?}, Return value and thrown An exception cannot distinguish the same name. The role is the type of method parameters and a number of attention >> is a sign of the symbol, >>> is the shift of zero to the right.