tag:blogger.com,1999:blog-7258332205026269340.post6147719398869937182..comments2024-02-21T01:43:44.367-08:00Comments on Selenium-By-Arun: 48. ArraysPriyanka Motoorihttp://www.blogger.com/profile/04643338373711611455noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-7258332205026269340.post-55547860919778857682015-07-15T02:22:56.511-07:002015-07-15T02:22:56.511-07:00@Jenny - Please compare your code with the below c...@Jenny - Please compare your code with the below code to correct the errors. The below program prints all the elements of the array.<br /><br />public class ArrayDemo {<br /> <br /> public static void main(String args[])<br /> {<br /><br /> int a[][] = {{1,0,0} ,{2,0,0} , {3,0,0} ,{4,0,0}} ;<br /> <br /> for(int i=0; i<a.length; i++){<br /> <br /> for(int j=0; j<a[0].length; j++){<br /Arun Motoorihttps://www.blogger.com/profile/18156045285817519369noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-34262849070758054912015-07-15T02:12:00.716-07:002015-07-15T02:12:00.716-07:00class arraytest1
Hi arun,
Can you tell me where i ...class arraytest1<br />Hi arun,<br />Can you tell me where i am wrong in this,<br />I am getting 1 error which i have included at the given below program.<br /><br />{<br />public static void main(String args[])<br /> {<br /><br /> int a [] [] = {1,0,0} ,{2,0,0} , {3,0,0} ,{4,0,0} ;<br /><br /> System.out.println("2 dimensional array is " + a[][]);<br /> }<br /><br /> }<br /><br />On Anonymoushttps://www.blogger.com/profile/07776375095770315132noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-87361022691905849742015-04-02T02:13:08.986-07:002015-04-02T02:13:08.986-07:00@ Aman Gupta - Yes you will get the same result wi...@ Aman Gupta - Yes you will get the same result with both the statements. <br /><br />But if you use the below two statements, you will get a different output -<br /><br />System.out.print(a[i][j]+"-");<br />And<br />System.out.print(a[i][j]);<br /><br />Assuming a[i][j] is holding a value say 9, the first print statement will print 9- as output and the second print statement will printArun Motoorihttps://www.blogger.com/profile/18156045285817519369noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-47769283442822196762015-03-11T22:45:06.748-07:002015-03-11T22:45:06.748-07:00What is the diff b/w:
System.out.print(a[i][j]+&q...What is the diff b/w:<br /><br />System.out.print(a[i][j]+"");<br />And <br />System.out.print(a[i][j]);<br /><br />I am getting the same results with both the statements.Anonymoushttps://www.blogger.com/profile/15063826473984494996noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-31030309704505994612015-03-02T02:59:56.251-08:002015-03-02T02:59:56.251-08:00@Everyone - Understand for loop at http://selenium...@Everyone - Understand for loop at http://selenium-by-arun.blogspot.in/2013/02/58-for-iterative-statements.htmlArun Motoorihttps://www.blogger.com/profile/18156045285817519369noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-752620513587080892014-12-11T03:06:40.284-08:002014-12-11T03:06:40.284-08:00Hi Arun,
Can you please elaborate on how you get ...Hi Arun,<br /><br />Can you please elaborate on how you get the outputs from the for conditions?<br /><br />I'm really confused.Anonymoushttps://www.blogger.com/profile/08361552271617850515noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-36497150536842448352014-10-28T11:35:51.802-07:002014-10-28T11:35:51.802-07:00I appreciate your wonderful effort arun and I do r...I appreciate your wonderful effort arun and I do respect your views and in addition to your views on post number 47 regarding type conversion it would be better to add Types of Type casting like Implicit, Explicit and Boolean Type Casting for better understanding. Thank you :)Bharadwaj.Phttps://www.blogger.com/profile/12982762830818784502noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-111723765877465082014-08-29T07:23:00.243-07:002014-08-29T07:23:00.243-07:00ARUN I dint understand the for condition can u pl...ARUN I dint understand the for condition can u please elaborate how it takes and gives outpotraghavihttps://www.blogger.com/profile/01650096213661941256noreply@blogger.com