Final keyword
Final keyword can be used before local variable ,instance variable,static variable,class and method.
1
Before instance variable
because of using final keyword before instance variable , it can be initialized in two way 1 in statement itself for eg public int x=10;2 by making constructor
2
before static variable
Variable can be initialized in two way 1 with final keyword and by making static block
3
Before local variable
It can be initialized with final keyword itself and after that it can't be changed.
4
before method
Method can not be overridden .
5
Before class
Class can't have its subclass and can't extends
For next "This" keyword See my next blog
Nice blog it is helpful
ReplyDelete