126. What Is The Difference Between An Interface & An Abstract Class? Answer: An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement default behavior and all methods are implicitly abstract. An interface has all public members and no implementation. 127 .Can An Interface Extend Another Interface? Answer: Yes an Interface can inherit another Interface, for that matter an Interface can extend more than one Interface. 128. If A Method Is Declared As Protected, Where May The Method Be Accessed? Answer: A protected method may only be accessed by classes or interfaces of the same package or by subclasses of the class in which it is declared. 129. What Will Happen If Static Modifier Is Removed From The Signature Of The Main Method? Answer: Program throws "NoSuchMethodError" error at runtime. 130. What Is The Default Value Of An Object Reference Declared...
All HR and Technical interview questions with answers for freshers and experienced professional. It helps job seekers who are about to attend interviews.