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 |
1,2,4,8,16,....,64,128,....,512
What is the selling price of a scooter? If the cost of the scooter is Rs 50 and a profit of 10% over selling price is earned.
Input an array and then print the repeating characters?? Example: Input:1,3,23,11,44,3,23,2,3. Output:3,23 plz help me.... i want a code of it. In C language.
Total number of wheels of bicycles & 4 wheeled vechicles is 38. How many bicycles are there?
The LCM of two numbers is 2079 and their HCF is 27. If one of the numbers is 189, find the other number. (a) 248 (b) 128 (c) 297 (d) 336 (e) None of these
Find the hypotenuse of a right angle isoceles triangle whose area is 50.
plz send test pattern of nsn engineers graduate.
A person gives a secret to two other persons in 5 minutes. How long will he take to tell the secret to 768 people?
Instead of multiplying a number by 7, the number is divided by 7. What is the percentage of error obtained?
0 Answers 3i Infotech, Amazon, Canara Bank,
There are two natural numbers. A cube difference of the squares is a square difference of their cubes.These are the smallest possible numbers. what is the sum of these numbers?
A sum of Rs 312 is divided among 100 boys and girls such that every boy gets an amount of Rs 3.60 and every girl gets 2.40 Rs. Calculate the number of girls in the group.
Find the 8th term in series: 2, 2, 12, 12, 30, 30, - - - - -