Why we declare in the way List ab = new ArrayList(); what is the use of it?
Answer / sravani gupta
When you declare List l = new ArrayList() l is limited to the methods provided by the interface List, while when you declare it ArrayList al = new ArrayList() it can use all methods and fields in an arraylist.
When you declare it List l then you afford yourself more flexibility as you can change out the ArrayList for something more appropriate at a later date if you want to without breaking any code
| Is This Answer Correct ? | 3 Yes | 3 No |
solve (7x+4y)/(x-2y) if (x/2y)=(3/2)
3x + 4y =15 so what is the slope of line which is perpendicular to this line.?
Every year on the day of Janmashtami, both Mr. Deepak Patel and Mr. Radha Krishnan distribute sweets free of cost at their respective shops. Last year on the day of Janmashtmi, there were a total of 1013 and 1057 people standing in two different queues in front of the shops of Mr. Deepak Patel and Mr. Radha Krishnan respectively. If there are at least 3 women between any two men in each of these two queues, then the total number of men in both the queues cannot be more than
Find the value of @@+25-++@1..., where @ denotes "square" and + denotes "square root".
solution for the question: NOON+MOON+SOON=JUNE, each alphabet represents the number. what is the answer? what does JUNE represents?
If a car starts from A towards B with some velocity.Due to some problem in the engine after travelling 30km, the car goes with 4/5 th of its actual velocity The car reaches B 45 min later to the actual time.If the car engine fails ofter travelling 45km, the car reaches the destination B 36min late to the actual time .What is the initial velocity of car and what is the distance between A and B in km ?
Ann, Boobie, Cathy and Dave are at their monthly business meeting. Their occupations are author, biologist, chemist and doctor, but not necessarily in that order. Dave just told the biologist that Cathy was on her way with doughnuts. Ann is sitting across from the doctor and next to the chemist. The doctor was thinking that Boobie was a goofy name for parent's to choose,but didn't say anything. What is each person's occupation?
Which of the following equations has a root in common with x2 - 6x + 5 = 0?
A Farmer owns a square land of 15 m each side with a pole in one of the corners to which he tied his cow with a rope whose length is about 10 m. What is the area available for the cow to graze. (Assume pi = 3)
Find the hypotaneous of a right angle isosceles triangle whose area is 50.
3978 + 112 x 2 = ? ? 2 (a) 8180 (b) 2101 (c) 4090 (d) 8404 (e) None of these
512.85+376.598+(-402.8 +6x0)= ?