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

Interview Questions Of Core Java For Selenium WebDriver – Part 2

Part 2 Core java interview questions for selenium automation testing 6 : What is the difference between static and not static variable? Answer : Main differences are as bellow. Static variables are preceded by static keyword. For non-static variable, there is not any preceding keyword. Memory is allocated for static variables at the time of class loading. Memory is … Read more

Java Interview Questions For Selenium WebDriver – Part 1

PART 1 1 : What is object in java? Answer : Object Is an Instance of class and it has its own state and behavior. In real world we can say, Dog is object of Animal class which have different state like breed, color, name, hungry, etc and behavior  like wagging tail, fetching, barking etc. 2 : What is class? … Read more