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

What is degree of a Relation?

1287


xsqrt(0.09)=3 , then x equals

1345


How many mod 3 counters are required to construct mod 9 counter.

1312


The mean and the variance of a binomial distribution are 4 and 2 respectively. Then the probability of 2 successes is?

1230


The Parallelogram PQRS, the line RS have midpoint T from line PQ. What is the ratio of Triangle PTS / parallelogram PQRS?

1681


Hi, Can anybody please send me the last year question papers of Oriental Bank of Commerce PO exam. My email ID is: yamini.friend14@gmail.com Thanks.

2087


A rectangular tank can hold m litres of milk. Find how many litres of milk can a tank hold when all its dimensions are doubled?

1221


Bird is flying 120km/hr b/w b to r. Two trains at b to r at 60 kmph the distance traveled by the bird before it is killed.

1262


2 oranges,3 bananas and 4 apples cost Rs.15 . 3 oranges 2 bananas 1 apple costs Rs 10. what is the cost of 3 oranges, 3 bananas and 3 apples ANs Rs 15.

1429


epaulet : shoulder : : ring :?

1890


pls send me andhra bank clerk model papers&syllabus

2267


r= 5 n = 3 . If first pole has 2 flags ,third pole has 1 flag how many ways the remaining can be arranged?

1195


Four Members A, B, C, D are playing a game .A person losing a game should double the amount of others .B, C, D are losing in order after three games .The amount after 3 games are A&B having 40,D is having 16&C 80. Who started with small amount of money?

1286


if the word 'ddosszm' is changed to 'central' then what will be the change for 'rtjbl' ?

1617


The difference between the compound and simple interest on a certain sum for 2 years at the rate of 8% per annum is Rs.80,What is the sum?

1266