Java For Selenium Interview Questions
Java For Selenium Interview Questions
• Selenium written in Java, it doesn't mean that Java only more compatible with
selenium, we can use other supported languages also.
• Good support for Selenium with Java, You can get more help documents and
implementations from Internet.
• Java Basics are Data Types, Variables, Modifiers, Operators, Flow Control
statements, Functions, Comments etc...
3) What is Java?
• java is Securable, using Java we can develop virus free and tamper free systems.
• Download and extract Eclipse IDE to write and execute Java Programs.
• Java Program file name should exactly match with class name.
• public static void main (String args[])- Java program execution starts from main
method, which is mandatory in every java program.
Data type is a classification of the type of data that a variable or object can hold in
Computer programming.
• Characters
vii) char (16 bits)
• Conditional
viii) Boolean
i) Instance variables
(A variable that is declared inside the class but outside the method.)
i) Assignment Operators
ii) Arithmetic operators
iii) Relational operators
iv) Logical Operators
Etc...
i) if statement
ii) switch statement
Whenever we want execute a block of statements multiple times then we use Loop
structures.
i) for loop
ii) while loop
iii) do while loop
iv) Enhanced for loop
• Java Array is an Object that holds a fixed number of values of a single data type.
• The class where the class members are getting inherited is called as Super class /
parent class / Base class.
• The class to which the class members are getting inherited is called Sub class /
Child class / Derived class.
• The inheritance between Super class and Sub class is achieved using "extends"
keyword.
• Static and final modifiers are not allowed for interface methods.
• By providing setter and getter methods, we can make a class read only or write
only.