tag:blogger.com,1999:blog-7258332205026269340.post7862375348730232219..comments2024-02-21T01:43:44.367-08:00Comments on Selenium-By-Arun: 92. 'length' array attributePriyanka Motoorihttp://www.blogger.com/profile/04643338373711611455noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-7258332205026269340.post-4513746094843520662018-03-28T20:30:05.130-07:002018-03-28T20:30:05.130-07:00the system.out.print statement is not clearly expl...the system.out.print statement is not clearly explained. How did we print all the indexes together at one time with this statement.?Anonymoushttps://www.blogger.com/profile/14312455316118113030noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-42293946801397616852015-12-26T11:11:14.223-08:002015-12-26T11:11:14.223-08:00@viki - Without the mentioned code we get the belo...@viki - Without the mentioned code we get the below output -<br /><br />The value assigned to a[0] is 0<br />The value assigned to a[1] is 0<br />The value assigned to a[2] is 0<br />The value assigned to a[3] is 0<br />The value assigned to a[4] is 0<br />The value assigned to a[5] is 0<br />The value assigned to a[6] is 0<br />The value assigned to a[7] is 0<br />The value assigned to a[8] is 0Arun Motoorihttps://www.blogger.com/profile/18156045285817519369noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-13155524796516854432015-10-19T09:49:57.782-07:002015-10-19T09:49:57.782-07:00In step 4,
without below mentioned code also we ca...In step 4,<br />without below mentioned code also we can get the same output:<br />for(int i=0;i<a.length;i++)<br />{<br />a[i]=i;<br />}<br /><br />are there any specific reason for that?vikihttps://www.blogger.com/profile/11733943820651908569noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-9977530912552959252014-09-08T08:09:07.369-07:002014-09-08T08:09:07.369-07:00@Raghavi - length variable will be automatically c...@Raghavi - length variable will be automatically created when an array is created. length is a final type variable which holds the size of the array and the value of the length cant be changed. <br /><br />For example - if we have created the array of size 15 as shown below -<br /><br />int a[] = new int[15];<br /><br />Java automatically create a final type variable 'length' with the Arun Motoorihttps://www.blogger.com/profile/18156045285817519369noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-53509969396751317682014-09-08T05:50:56.020-07:002014-09-08T05:50:56.020-07:00Hello arun
here u dint create any class or method...Hello arun<br /><br />here u dint create any class or method with length then how can we take a.length?raghavihttps://www.blogger.com/profile/01650096213661941256noreply@blogger.com