Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Why we declare in the way List ab = new ArrayList(); what is the use of it?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Technical questions

1833


Difference between the perimeters of two concentric circles is 66. Find the difference between radius.

1345


a person who decided to go weekend trip should not exceed 8 hours driving in a day average speed of forward journey is 40 mph.due to traffic in sun days the return journey average speed is 30 mph.how far he can select a picnic spot.

1393


If a person walks at 14 km/hr instead of 10 km/hr, he would have walked 20 km more. The actual distance travelled by him is?

1413


Add a word in starting of SCAPE and at the end of Grass, u will get two different word

1118


present ages of sameer and anand are in the ratio of 5 : 4 respectively. Three years hence, the ratio of their ages will become 11 : 9 respectively. What is anand's present age in years?

1225


If the area of a square has increased by 69%,by what % has its side increased?

1289


perimeter of rectangle is s and the other side is x, then the other side

1050


In a 10 digit number, if the 1st digit number is the number of ones,2nd digit number is the number of twos, and ... so on. 10th digit is the number of zeroes,then find the number

1179


Each row of letters or numbers has a rule connecting them. Write the next number or letterin the brackets. 124 , 62 , 60 , 30 , 28 , 14 , (_ _ _)

1147


33 1/3 of 101 + 296 is

1459


slur : speech :: smulge : ?

1258


Find the next letter in the series B,F,J,P ---

1233


pick the odd one out bend shave chop whittle shear

2465


A man drives at a speed of 40 miles/hr. His wife left 30 mins. late with 50 miles/hr speed. when will they meet ?

1700