i) Java Basics for Selenium ( Variable, Data Types & Objects )
Variable: A Java variable is a piece of memory that can contain a data value during java program execution. Variable Declaration: To declare a variable, you must specify the data type & give the variable a unique name. Ex., int a,b,c; float pi; double d; char a; Variable Initialization: To initialize a variable, you must assign it a valid value. Ex., int a=2,b=4,c=6; float pi=3.14f; double do=20.22d; char a=’v’; Types of variables In Java, there are three types of variables: Local Variables Instance Variables Static Variables 1) Local Variables Local Variables are a variable that are declared inside the body of a method. 2) Instance Variables Instance variables are defined without the STATIC keyword .They are defined Outside a method declaration. They are Object specific and are known as instance variables. 3) Static Variables Static variables are initialized only once, at the start of the program execution. These variables should be initialized first, before the initializat...