filmov
tv
Java Tutorial Day 3 |Loops | Nested for loop|Enhanced loop|Terminate loop| break|Selenium WebDriver

Показать описание
Day1:
------------
JAVA Introduction
Java Execution Flow
Variables
DataTypes
Conditional Statements
Examples:
Day1 Video Link:
Github Repo Link:
-------------------------------------------------------------------------------------------------------------------------
Day2:
------------
Array is a datastructure useful to store multiple values of similar datatype
There are two types of array.
1. Single Dimensional Array
2. Multi Dimensional Array
Day2 Video Link:
Github Repo Link:
-------------------------------------------------------------------------------------------------------------------------
Day3:
---------------
Loops:
for
nested for loop
Enhanced for loop
while
do-while
Loops will helps us to perform an activity for specified number of times.
Example:
Printing selenium 10 times
syso("selenium");
syso("selenium");
syso("selenium");
syso("selenium");
syso("selenium");
syso("selenium");
syso("selenium");
syso("selenium");
syso("selenium");
Syntax of for Loop:
----------------------
for(initialization;condition;increment/decrement)
{
//block of statement
}
for(int i=0; i10;i++) //i = i+1 i = 0+1
{
syso("selenium");
}
0,1,2,3,4,5,6,7,8,9
Syntax of Nested for Loop:
-------------------------------------------
A for loop inside another for loop is called Nested Loop.
This will be helpful in the case of reading the tabular data in the webpage and also to read the data from the
XLS/XLSX where the rows and cols are available.
for(initialization;condition;increment/decrement)
{
//block of statement
for(initialization;condition;increment/decrement)
{
//block of statement
}
}
Using the break in the case of Loops:
---------------------------------------
The break statement helps the loop to terminate the java program immediately and control goes to the next statement
following the loop.
Syntax of Enhanced for Loop:
----------------------------------
Enhanced for loop is useful in the specific scenario's when there is no possibility of retrieving the elements from the
collection without using the index.
for(data_type variable : arrayName | collection(List,Set,Map))
{
}
Syntax for while loop:
-----------------------
initialization;
while(condition)
{
//block of statements
increment/decrement;
}
Syntax of do-while loop:
----------------------------
initialization;
do{
//block of statements
increment/decrement;
}while(condition);
Diff between while and do- while is even if the condition is false it executes the do-while loop once.
PlayList Details:
SOAPUI:
JIRA:
SELENIUM INTERVIEW QUESTIONS:
PAGE OBJECT MODEL PRINCIPLES:
JENKINS:
REST API TUTORIAL:
JAVA:
SELENIUM WEBDRIVER:
XPATHTUTORIAL:
CssSelector:
GITHUB:
------------
JAVA Introduction
Java Execution Flow
Variables
DataTypes
Conditional Statements
Examples:
Day1 Video Link:
Github Repo Link:
-------------------------------------------------------------------------------------------------------------------------
Day2:
------------
Array is a datastructure useful to store multiple values of similar datatype
There are two types of array.
1. Single Dimensional Array
2. Multi Dimensional Array
Day2 Video Link:
Github Repo Link:
-------------------------------------------------------------------------------------------------------------------------
Day3:
---------------
Loops:
for
nested for loop
Enhanced for loop
while
do-while
Loops will helps us to perform an activity for specified number of times.
Example:
Printing selenium 10 times
syso("selenium");
syso("selenium");
syso("selenium");
syso("selenium");
syso("selenium");
syso("selenium");
syso("selenium");
syso("selenium");
syso("selenium");
Syntax of for Loop:
----------------------
for(initialization;condition;increment/decrement)
{
//block of statement
}
for(int i=0; i10;i++) //i = i+1 i = 0+1
{
syso("selenium");
}
0,1,2,3,4,5,6,7,8,9
Syntax of Nested for Loop:
-------------------------------------------
A for loop inside another for loop is called Nested Loop.
This will be helpful in the case of reading the tabular data in the webpage and also to read the data from the
XLS/XLSX where the rows and cols are available.
for(initialization;condition;increment/decrement)
{
//block of statement
for(initialization;condition;increment/decrement)
{
//block of statement
}
}
Using the break in the case of Loops:
---------------------------------------
The break statement helps the loop to terminate the java program immediately and control goes to the next statement
following the loop.
Syntax of Enhanced for Loop:
----------------------------------
Enhanced for loop is useful in the specific scenario's when there is no possibility of retrieving the elements from the
collection without using the index.
for(data_type variable : arrayName | collection(List,Set,Map))
{
}
Syntax for while loop:
-----------------------
initialization;
while(condition)
{
//block of statements
increment/decrement;
}
Syntax of do-while loop:
----------------------------
initialization;
do{
//block of statements
increment/decrement;
}while(condition);
Diff between while and do- while is even if the condition is false it executes the do-while loop once.
PlayList Details:
SOAPUI:
JIRA:
SELENIUM INTERVIEW QUESTIONS:
PAGE OBJECT MODEL PRINCIPLES:
JENKINS:
REST API TUTORIAL:
JAVA:
SELENIUM WEBDRIVER:
XPATHTUTORIAL:
CssSelector:
GITHUB: