These lessons can help you regarding selenium webdriver meeting planning also. Allow we begin with various datatypes In espresso which we are able to use within our selenium webdriver application test-case planning.
In espresso or every other encoding dialects, datatypes signifies what kind of ideals could be saved and what’ll function as the dimension of this worth or just how much storage is likely to be allotted. You will find nearest ten various datatypes in espresso like byte, brief, int, lengthy, drift, dual, char, Boolean. byte and brief datatypes aren’t a lot more helpful in selenium webdriver and so I am missing these below to diminish your confusions.
int datatype :
int info form is advantageous to shop 32-bit integer (Instance: 4523) ideals just. We cannot shop decimal (Instance 452.23) ideals in int info form.
Example :
int i = 4523;
Example :
long l = 652345;
Example :
double d1 = 56.2354;
double d2 = 12456;
char c = 'd';
boolean datatype
boolean datatype is useful to store only boolean(Example : true) values.
Example :
boolean b = true;
String Class
String is not a data type but it is a class which is useful to store string in variable.
Example :
String str = "Hello World";
VIEW DIFFERENT FUNCTIONS OF STRING CLASS
Created bellow given example for all these datatypes. Run it in your eclipse and verify results.
public class datatypes {
public static void main(String[] args)
{
int i = 4523; //Can store 32 bit integer values only.
long l = 652345; //Can store 64 bit integer values only.
double d1 = 56.2354; //Can store 64 bit decimal values.
double d2 = 12456; //We can use it for integer values too.
char c = ‘d’; //Can store single character only.
boolean t = true; //Can store only boolean values like true or false.
String str = “Hello World”; //Can store any string values.
System.out.println(“Integer Var Is –> “+i); System.out.println(“Long Var Is –> “+l); System.out.println(“double Var d1 Is –> “+d1); System.out.println(“double Var d2 Is –> “+d2); System.out.println(“char Var c Is –> “+c); System.out.println(“boolean Var b Is –> “+t); System.out.println(“boolean Var str Is –> “+str); }
}