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

Java Questions For Selenium WebDriver Interview

Part 5 21 : Explain System.out.println(); Answer : System : is a final class in  java.lang package. out : is a static member of system class. It is an instance of java.io.PrintStream. This stream is already open and ready to accept output data. println : is a method of java.io.PrintStream .It is an overloaded method. 22 : Write program to print fibonacci series 0, 1, 1, … Read more

Frequently Asked Java Interview Questions Part – 4

Part 4 16 : Can we overload static methods?  Answer : Yes.. There is not any restriction to overload static methods. We can overload static and non static methods in java. VIEW MORE on overloading in java. 17 : Can we use private member of parent class in sub class? Answer : No.. It will not allow to use private … Read more

Core Java Interview Questions For Selenium WebDriver – Part 3

Part 3 11 : Why main method is static? Answer : As we know, We can access static stuff without creating object of class. Because of static keyword with main method, Java virtual machine can directly call it without creating object of class. This way it will provide kind of root to start execution of program. 12 : What is … Read more