π‘°π’π’•π’†π’“π’—π’Šπ’†π’˜ π‘·π’“π’†π’‘π’‚π’“π’‚π’•π’Šπ’π’ II Selenium + Java II π™·πš˜πš  𝚝𝚘 πš™πšŽπš›πšπš˜πš›πš– πš›πšŽπšŸπšŽπš›πšœπšŽ 𝚘𝚏 𝚊 πš—πšžπš–πš‹πšŽπš› πšžπšœπš’πš—πš π™΅πš˜πš› π™»πš˜πš˜πš™

Published: 25 March 2021
on channel: Knowledge Share
89
3

In this video, you will learn how to perform reverse of a number using for loop

Please check this play list for Interview Series on Selenium + Java

Β Β Β β€’Β π‘°π’π’•π’†π’“π’—π’Šπ’†π’˜Β π‘·π’“π’†π’‘π’‚π’“π’‚π’•π’Šπ’π’Β IIΒ SeleniumΒ +Β J...Β Β 

GitHub Repository link for basic Selenium programs for practise
https://github.com/knowledgeshare-tec...

Please join below Facebook Group for collaboration
Β Β /Β 4754296501308288Β Β 

Please Subscribe to Knowledge Share Channel where you can learn Automation Testing
Β Β Β /Β @knowledgeshare1311Β Β 

Code :
********************************************************
Reverse of a Number using For loop (Method - 1):
********************************************************

package interviewQuestionsOnJava;

public class Reverse_of_a_Number_using_ForLoop
{

public static void main(String args[])
{
int number =1234;
int reverse = 0;
// for storing the result and initially made it to be 0;

//while(number!=0)
for( ;number!=0;)
{
int rem=number%10; //Step -1
System.out.println("Now remainder is : " + rem );
reverse = reverse*10 + rem; //Step -2
System.out.println("Now reverse is : " + reverse );
number=number/10; //Step -3
System.out.println("Now Number is : " + number );

}
System.out.println("*************************************");
System.out.println("Reverse of a Number using For loop [ Method - 1 ] : " + reverse );
}

}

Code :
********************************************************
Reverse of a Number using For loop (Method - 2): ​
********************************************************

package interviewQuestionsOnJava;

public class Reverse_of_a_Number_using_ForLoopMethod2
{

public static void main(String args[])
{
int number =1234;
int reverse = 0;
// for storing the result and initially made it to be 0;

//while(number!=0)
for( ;number!=0;number=number/10)
{
int rem=number%10; //Step -1
System.out.println("Now remainder is : " + rem );
reverse = reverse*10 + rem; //Step -2
System.out.println("Now reverse is : " + reverse );

System.out.println("Now Number is : " + number );

}
System.out.println("*************************************");
System.out.println("Reverse of a Number using For loop [ Method - 2 ] : " + reverse );
}

}


Watch video π‘°π’π’•π’†π’“π’—π’Šπ’†π’˜ π‘·π’“π’†π’‘π’‚π’“π’‚π’•π’Šπ’π’ II Selenium + Java II π™·πš˜πš  𝚝𝚘 πš™πšŽπš›πšπš˜πš›πš– πš›πšŽπšŸπšŽπš›πšœπšŽ 𝚘𝚏 𝚊 πš—πšžπš–πš‹πšŽπš› πšžπšœπš’πš—πš π™΅πš˜πš› π™»πš˜πš˜πš™ online without registration, duration hours minute second in high quality. This video was added by user Knowledge Share 25 March 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 8 once and liked it people.