Skip to main content

Posts

JAVA-OOPS: ABSTRACTION

Recent posts

JAVA-OOPS: POLYMORPHISM

This post covers the topic Polymorphism POLYMORPHISM Poly->many Morphism->forms Taking more than one forms is called polymorphism or one task completed by many ways It has 2 types, Method overloading (static binding/compile time polymorphism) Method overriding (dynamic binding/run time polymorphism) 1. Method overloading: Class->same Method->same Argument->differ In a same class method name is same and the argument is different is called method overloading the argument is depends on data types data types count data type order Example Program: public class StudentInfo {      private void studentId(int num) {      }      private void studentId(String name) {      \\ depends on order      }      private void studentId(String email, int ph) {      \\depends on data type      }      private void studentId(int dob, String add) {    ...

Java Interview Questions For Selenium Testers

This post covers Core Java Interview Questions for Selenium Automation Testers. Question 1: Why did you choose Java? Answer:  Java is open source and easy to learn. Writing, Compiling and debugging is easy. We can reuse the code. Question  2: What are all the features of Java? Answer:  Question 3: Why Java is platform independent? Answer:  Java compiler converts Source code to Byte Code. We can run it in any platform such as Windows, Mac, and Linux etc. Question 4: Data types and Its Default Values? Answer: Data type has two types namely, Primitive : (Stores directly) Predefined Can store only one value There are no additional methods Non-primitive : (Stores based on reference) Not-Predefined Can store more than one value It references a memory location which stores the Data. (Reference variables) Default Values: Data Type Memory Size (Byte) Default Value Wrapper Class byte 1 0 Byte Short 2 0 Sh...