1. There is no need to initialize static variable because by default it set variable value to zero, but when you use "final" keyword with static then you must have to initialize that variable with value, otherwise you will get compile time error
2. Only a class whose definition is complete can be declared as final, once you declare any class as final den after you cant be extend this class or you cant override any method also.
3. you cant instantiate class which is declared as abstract type
4. Final variable are known as "blank final variable" and "named constant"
5. abstract and final will never work together.
6. You cant declare transient variable inside methods
7. Sometime, Java used to cache variable value in the memory for efficiency purpose, which is not correct in the case of multi-threading. To avoid jvm to store variable value in the cache we can use "volatile" keyword.
8. You can not use final and volatile both at same time.
9. VirtualMachineError, LinkageError are going to handel by "Error" class
10. Each assetions contains boolean expression , if its reutn true when assertion is executed. if its return false, the system throws a special assertion type exceptions.
Wednesday, August 27, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment