Datatypes – Fundamental Java Courses Regarding Selenium WebDriver

I’ve obtained numerous demands from my weblog visitors regarding publishing several fundamental espresso lessons that are truly needed in selenium webdriver application screening procedure. Therefore today I’ve prepared to publish several fundamental espresso guide articles that are truly needed in selenium webdriver understanding and execution inside your application screening procedure.

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 java like byte, brief, int, long, double, char, Boolean,string. 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 data type is useful to store 32 bit integer (Example : 5623) values only. We can not store decimal
(Example 452.23) values in int data type.
Example :

int i = 5623;

long datatype

long datatype is useful to store 64 bit integer(Example : 895746) values. You can use it when your value
is more larger and can not hold it in int. Same as int datatype, we can not store decimal (Example 452.23)
values in long datatype
Example :

long l = 895746;

double datatype

double datatype is useful to store 64 bit decimal(Example : 56.2354) values. We can store integer (Example
12456) values too in double datatype.
Example :

double d1 = 56.2354;
double d2 = 12456;

char datatype

char datatype is useful to store single character(Example : ‘d’). It can not store more than one (Example
‘dd’) character in it.
Example :

char a = ‘d’;

boolean datatype

boolean datatype is useful to store only boolean(Example : false) values.
Example :

boolean c = 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 = “Hi Deepthi”;
SEE VARIOUS FUNCTIONS OF CHAIN COURSE

Produced bellow provided instance for several these datatypes. Operate it inside your eclipse and confirm outcomes.
public class datatypes
{
public static void main(String[] args)

{
int i = 5623; //Can store 32 bit integer values only
long l = 895746; //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 a = ‘d’; //Can store single character only
boolean c = 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);
}
}

Leave a Reply

Your email address will not be published. Required fields are marked *