tag:blogger.com,1999:blog-7258332205026269340.post2894787223150858602..comments2024-02-21T01:43:44.367-08:00Comments on Selenium-By-Arun: 37. Second Simple Java ProgramPriyanka Motoorihttp://www.blogger.com/profile/04643338373711611455noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-7258332205026269340.post-29326269242685133642017-03-16T23:57:38.963-07:002017-03-16T23:57:38.963-07:00Hi @SHOBS - the code you wrote is correct, once va...Hi @SHOBS - the code you wrote is correct, once var is define with data type need not to define again.Unknownhttps://www.blogger.com/profile/08153309064287184903noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-36507872232174082982017-03-10T06:03:23.182-08:002017-03-10T06:03:23.182-08:00Hi @SHOBHS - Ans is already mentioned above. you n...Hi @SHOBHS - Ans is already mentioned above. you need to define num =num1 +num2 as int num = num1+ num2PratikshaKhttps://www.blogger.com/profile/15079123397807487939noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-6618775072077491252016-06-27T01:23:37.025-07:002016-06-27T01:23:37.025-07:00Hi Arun,
Can we write above code as :
class Exam...Hi Arun,<br /><br />Can we write above code as :<br /><br />class Example2<br />{<br /> public static void main(String args[])<br />{<br /> int num1,num2,num3;<br /> num1=110;<br /> num2=220;<br /> System.out.println("This is num1:" + num1);<br /> System.out.println("This is num2:" + num2);<br /> num3=num1 + num2;<br /> System.out.println("The Value of num1 + num2 is &SHOBHShttps://www.blogger.com/profile/18393562607430525927noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-86201724187156810572015-07-15T23:11:42.544-07:002015-07-15T23:11:42.544-07:00Ok Understood. Thanks Arun for the immediate Respo...Ok Understood. Thanks Arun for the immediate Response and Support. Realy Awsome blog!Anonymoushttps://www.blogger.com/profile/02826221369287268226noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-71825893127065860622015-07-15T05:35:46.733-07:002015-07-15T05:35:46.733-07:00@Tijoy - In the comment from Raghavi. She was usin...@Tijoy - In the comment from Raghavi. She was using three variables. num, num1,num2. Out of all the three only num1 and num2 are declared as int. In order to use num variable, we have to declare that as int. <br /><br />In your program, we didn't use three variables, instead we used only one variable i.e. num. As variables can be declared only once and to be declared before using them, it notArun Motoorihttps://www.blogger.com/profile/18156045285817519369noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-61292428359068621822015-07-15T05:29:51.188-07:002015-07-15T05:29:51.188-07:00hi Arun,
Am Just a beginner to JAVA
my doubt is
...hi Arun,<br />Am Just a beginner to JAVA<br />my doubt is <br /> class Example2<br /> {<br /><br /> public static void main(String args[])<br /> {<br /><br /> int num; // This statement declares the variable called num as integer variable.<br /> <br /> num = 100; // This statement assigns the value 100 to the integer variable numAnonymoushttps://www.blogger.com/profile/02826221369287268226noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-67609691438834664232015-06-19T02:47:07.900-07:002015-06-19T02:47:07.900-07:00Hi sir im nagendra i execute Example2 program,but ...Hi sir im nagendra i execute Example2 program,but the result shows why?<br />This is num::100<br />The value of 100 * 2 is num.Anonymoushttps://www.blogger.com/profile/12546018666338809071noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-79865417865551334892014-12-23T04:17:43.271-08:002014-12-23T04:17:43.271-08:00Awesome Awesome Awesome blog for any learner..
Sim...Awesome Awesome Awesome blog for any learner..<br />Simple english and excellent explanation.<br />All the topics explained in detail with good examples.<br />Need not to swing around different websites for the concepts of Selenium. <br />ALL IN ONE BLOG..!! (Selenium-By-Arun)<br />Great job Arun. Thanks a ton.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-40162345743425382682014-08-28T05:37:02.168-07:002014-08-28T05:37:02.168-07:00@raghavi - Please define the 'num' variabl...@raghavi - Please define the 'num' variable as integer (i.e. instead of num=num1+num2 you have to write int num=num1+num2)<br /><br />Also you can reduce the last two lines to single print statement -<br /><br />System.out.print("The sum of num1 and num2 is "+num);<br /><br /><br /><br /><br />Please find the revised code below -<br /><br />public class Number {<br /><br />Arun Motoorihttps://www.blogger.com/profile/18156045285817519369noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-57828450453067434242014-08-28T05:26:26.822-07:002014-08-28T05:26:26.822-07:00class Number
{
public static void ...class Number<br /> {<br /><br /> public static void main(String args[])<br /> {<br /><br /> int num1,num2; <br /><br /> num1 = 100; <br /> num2 = 200;<br /><br /> System.out.println("This is num1: " + num1); <br /> System.out.println("This is num2: " + num2);<br /><br />raghavihttps://www.blogger.com/profile/01650096213661941256noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-62777516475911043692014-05-21T00:13:42.355-07:002014-05-21T00:13:42.355-07:00@ Raghavan V - Thank You @ Raghavan V - Thank You Arun Motoorihttps://www.blogger.com/profile/18156045285817519369noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-47665499924344527222014-05-14T10:37:54.254-07:002014-05-14T10:37:54.254-07:00Excelent blog.keep it up.
every post excelent.
Excelent blog.keep it up.<br />every post excelent.<br />Anonymoushttps://www.blogger.com/profile/11891589662183004431noreply@blogger.com