8 questions I dont understand while studying for SCJP
I want to give my SCJP exam sometime this month. I was reading A Concise and Comprehensive Study Guide for SCJP by Dr. Paul S Sanghera. I would like to ask the learned members of this forum you a few queries that I have. I shall be grateful if you would kindly find time to reply me with your valuable suggestions
1. I know that: If a class is declared final, it means the class cannot be extended, and a final method cannot be overridden. If the element declared final is a variable, that means the value of the variable is constant, and cannot be changed.
My question is: If a final variable is inherited in another class, can it be accessed? And can its value be changed?
2. My question is: Could you please give an example of method call conversion of object reference types?
3. My question: Is it possible to inherit the main() method?
4. My question is: What are anonymous inner classes? Where are they used practically? How are they defined? What is their scope? Can they access variables of the outer class? If so how?
5. Can inner classes be defined inside a method? What is their scope? Can they access the variables within the method? Can they access the variables of the outer class?
6. Are all methods defined in java.lang.Math static?
7. What are factory methods?
8. My question: Can interfaces have classes?
Thanks for your help!
waiting for your quick reply!