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 |
A speaks truth 70% of the times, B speaks truth 80% of the times.What is the probability that both are contradicting each other is ?
A cube 3"* 3"* 3" is painted green it is cut into 1"* 1"* 1" how many cubes were painted on atleast on one side
There are 3 societies a,b,c. a lent tractors to b and c as many as they had. After some time b gave as many tractors to a and c as many as they have. After sometime c did the same thing. At the end of this transaction each one of them had 24. Find the tractors each originally had.
a man is 24 years older than his son. In two years, his age will be twice the age of his son. The present age of his son is?
One rectangular plate with lenght 8 inches, breadth 11inches and 2 inches thickness is there. What is the length of the circular rod with diameter 8 inches and equal to volume of rectangular plate?
A man spends half of his salary on household expenses, 1/4th for rent, 1/5th for travel expenses, the man deposits the rest in a bank. If his monthly deposits in the bank amount 50, what is his monthly salary ?
Aeroplane is flying at a particular angle and latitude,after some time another latitude is given..(8 hrs later), You are asked to find the local time of the place.
A person starts walking at a speed of 5km/hr through half the distance, rest of the distance he covers with a speed 4km/hr. Total time of travel is 9 hours. What is the maximum distance he can cover?
India : New Delhi : : Pakistan : ? (A) Lahore (B) Islamabad (C) Peshawar (D) Rawalpindi
any body send me the sample paper for pnb dy.managers,to ravitejareddy.r@gmail.com
0 Answers Punjab National Bank,
?Mango? is related to ?Fruit? in the same way as ?Potato? is related to (a) Fruit (b) Stem (c) Flower (d) Root (e) None of these
Find (7x + 4y ) / (x-2y) if x/2y = 3/2 ? (a) 6 (b) 8 (c) 7 (d) data insufficient Can anyone help me out to get answer for this question,i have exam on 6 th april can anyone find me the answer before that and post it please!!!!!!!!
15 Answers TCS, Tech Mahindra, Titan, Unisys,