Crazy java study notes two

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/qq125281823/article/details/90414014

java keyword

1. The authority modifier
public anywhere in the
protected class father and son, with bags
default (not write) with bags
private only this class
2.static (static)
becomes a, belong to the class, static methods can not access non-static variable
class initialization
instance initialization
3.final (non-variable)
used in the class can not be inherited, the non-rewritable process variables can not be altered
constant
4.class
5.interface
6.abstract (abstract)
7.extends
8.implement
9.goto ( reserved word)
10.new
11.throw
the throw new new Exception () example, the code in any place can
12.throws
used in the method signature
13.finally
14.try ... the catch ...

Guess you like

Origin blog.csdn.net/qq125281823/article/details/90414014