Java Collection Interface

Collection is an interface in java. Collection interface extends Iterable interface. In hierarchy, Collection interface is root of List, Queue and Set interfaces. It represents unit of its elements. i.e. group of objects. Some collections do not allow duplicate elements but some allows duplicate elements. Collection interface is base on which collection framework is built. … Read more

Interview Questions In Java For Selenium

Part 10 46 : What is Polymorphism? Answer : Polymorphism is ability using which we can create reference variables or methods which behaves differently in different programmatic context. Best example of polymorphism is human. We behaves differently with different people in different environment. Our behavior will be different when we meet to boss and meet … Read more

Java Questions And Answers For Selenium

Part 9 41 : In java, What is return type of main method? Answer : Main method doesn’t have any return type. It is void. 42 : Can We Overload main method in java? Answer : Yes, Java class can have any number of main methods so it is possible to overload main method. But … Read more

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