Java Questions For Selenium Interview

Part 8 36 : What is the difference between the Constructor and Method? Answer : Main difference between the Constructor and Method is as bellow. Constructor : Name of the constructor must be same as class name. Constructor must not have any return type. It is used to initialize the state of an object. It is not … Read more

Java Programming Interview Questions

Part 7 31 : What is default value of local variable. Answer : There is not any default value of local variable. You must have to initialize it. View more details on local variables in java. 32 : Java support constructor inheritance? Answer : No, Constructor inheritance is not supported in java. View more details on constructor in java. … Read more

Interview Questions on Java For Selenium

Part 6 26 : What is local variable in java? Answer : Local variable is declared inside method or constructor and it is limited for that method or constructor only. View more detail on local variable in java. Local Variable Example : public class JavaVariable { public void Calc() { // Local Variables. int sum; … Read more

What Is Use Of “Super” Keyword In Java?

Earlier we have talked about method overriding concept in java during THIS POST to change the implementation of parent class’s method in sub class. In inheritance, Super keyword is used to refer object of immediate parent class. Generally we are using super keyword in inheritance for three different purpose. Let’s see how and when to … Read more