Some Dongdong, easy to make mistakes in Java

xiaoxiao2021-03-06  88

Some Dongdong, easy to make mistakes in Java

1) InstanceOf: Objects that implement a class of an interface are also instances of the interface; some types of objects are also instances of such superclasses.

2) Native () modified method has no method, with a semicolon ";" instead of braces.

3) Main is not a keyword.

4) System.exit (int value), that is, as long as it is int, it is possible to exit system.exit ('A'); the same is legal.

5) &, | Can be used on int and Boolean, and ^ (videol or) can only be used on int.

6) If a class and an interface are defined in the same file, and the class is declared as public, you can't write before the interface, because the interface can only be modified with public, and one file can only have a public access Control keyword. 7) Unreachable Statement (1) will appear in the ReutRn statement after the unreachable statne. (2) Write the statement after the Throw statement. (3) The statement is defined after BREAK and Continue statement.

8) "/ u10100" // Legal, equivalent to '/ u1010' and string "0" 9) The access control of the long int car short byte10) class can be public or nothing .11) GOTO is a reserved word but is not a keyword. THEN did not .12) When the type of the superclass is enforced, the compilation has no abnormality, but there is an abnormality when running.

转载请注明原文地址:https://www.9cbs.com/read-98532.html

New Post(0)