tag:blogger.com,1999:blog-7258332205026269340.post188022276637102584..comments2024-02-21T01:43:44.367-08:00Comments on Selenium-By-Arun: 43. 'boolean' data typePriyanka Motoorihttp://www.blogger.com/profile/04643338373711611455noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-7258332205026269340.post-68449760282366038882016-03-03T02:34:36.230-08:002016-03-03T02:34:36.230-08:00Hi Arun,
Did not understand the flow of second pr...Hi Arun,<br /><br />Did not understand the flow of second program, also tried executing it but got error response as "could not find or load main class BoolTes2"<br /><br /> class BoolTest2<br />{<br /> public static void main(String args[])<br /> {<br /> boolean b=true;<br /><br /> if(b)<br /> System.out.println("This is executed");<br /><br /> b=falseAnonymoushttps://www.blogger.com/profile/04140846854889859047noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-10876226030870460052015-07-29T01:39:11.625-07:002015-07-29T01:39:11.625-07:00Hi .. Arun,
I am not getting the flow of executio...Hi .. Arun,<br /> I am not getting the flow of execution of second program.Can you brief more on this?Anonymoushttps://www.blogger.com/profile/06192748740255508380noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-58261425680180120792015-07-15T23:31:20.159-07:002015-07-15T23:31:20.159-07:00Thanks Arun! Understood the logic! :)Thanks Arun! Understood the logic! :)Anonymoushttps://www.blogger.com/profile/02826221369287268226noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-80615558923400049822015-07-15T23:27:02.583-07:002015-07-15T23:27:02.583-07:00@Tijoy - The following statements return either tr...@Tijoy - The following statements return either true or false<br /><br />10 > 9 -> returns true<br />10 < 9 -> returns false<br /><br />10 == 10 -> returns true<br />10 != 10 -> returns false<br /><br />You can store the values into a boolean type variable and print<br /><br />boolean b = 10 > 9; //assigns true to variable b<br />System.out.println(b); //prints true<br /><brArun Motoorihttps://www.blogger.com/profile/18156045285817519369noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-16297772688601413052015-07-15T23:15:12.878-07:002015-07-15T23:15:12.878-07:00hi arun am confused, for the below program!Please ...hi arun am confused, for the below program!Please help me!<br />Program demonstrating that the outcome of a relational operator is a boolean value<br />class BoolTest3<br />{<br /> public static void main(String args[])<br /> {<br /> System.out.println("10 > 9 is "+(10>9));<br /> }<br /> }<br />Output of this program:<br />10 > 9 is true<br /><br />How the Output Anonymoushttps://www.blogger.com/profile/02826221369287268226noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-21173058028464506622015-07-03T01:03:07.157-07:002015-07-03T01:03:07.157-07:00Thanks Arun.. i saw u used not equal which is corr...Thanks Arun.. i saw u used not equal which is correct<br />and the compilation error was of a semicolon missing<br />thanksTanuhttps://www.blogger.com/profile/17390022328768288858noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-66339125179496188722015-07-02T22:25:21.896-07:002015-07-02T22:25:21.896-07:00@Tanu - I didn't get any compiler error from y...@Tanu - I didn't get any compiler error from your code. I have modified your code to print the odd numbers. Please find the updated code below -<br /><br />public class PracticeIf {<br /><br /> public static void main(String[] args) {<br /> <br /> int i = 1 , j = 2, k ;<br /> System.out.println("first odd number is " + i);<br /> i++;<br /> for (i = 2;i < 30;i++){<br /> k Arun Motoorihttps://www.blogger.com/profile/18156045285817519369noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-53608954552402569902015-07-02T07:44:42.998-07:002015-07-02T07:44:42.998-07:00Hi Arun,
at each of ur blog pages, i am doing som...Hi Arun,<br /><br />at each of ur blog pages, i am doing some hands on myself to learn the basic well.<br />so on this page i thgt i will explore the for loop and i wrote a simple program, intend to write odd numbers between 1 to 30<br />but it gives complition error .. can you help?<br />public class PracticeIf {<br /><br /> //this i am writing to do hands on with If statement<br /> public Tanuhttps://www.blogger.com/profile/17390022328768288858noreply@blogger.com