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

box 1 cotain odd value X or Y the box 2 =X i.e 7 or 12 box 3= Y has value 19 if X is 7 or 31 if x is 12 get even value X or Y Use any operator steps allowed 3

5354


a father is 30 times more than his son however he will be only thrice as old as the son what is father's present age ?

1146


If a square is formed by the diagonal of the square as an edge, what is the ratio between the area?

1562


An apple seller is having some apples. He is selling half of the apple what he has plus half the apple to the first customer. In the same way he sells the remaining apple to 7 customers. After selling to 7 customers, he has no apples with him.

1290


In a class of 60 students, a student of weight 45 Kg leaves the class. The average weight of the class is then increased by 200 gms. What is the average weight of the remaining 59 students in the class?

1163


if x/y =4 and y is not '0' what % of 'x' is '2x-y'

1195


a hollow space on earth surface is to be fille((d) total cost of filling is rs 20000. The cost of filling per mt3 is rs 225 .how many times a size of 3 mt3 soil is required to fill the hollow space?

1141


In a storage stall of 5x3x2inch.How many blanks of size 2x1x1inch can be stored..

2200


How many liters of water must be added to 30 liters of alcohol to make a solution that is 25%

1142


if the sum of five consecutive nos. 35? how many prime numbers are there :

1208


Time and speed time and work boat and streams

1497


Respected Sir/Mem Plz send me all 5 years solved question papers of sbi clerk on my Gmail id and that is chandelmishel@gmail.com

2411


A school has 30% students from Maharashtra .Out of these 20% are Bombey students. Find the total percentage of Bombay?

1276


Two coins one with HEAD IN BOTH SIDES and the other coin HEAD IN ONE SIDE AND TAIL IN THE OTHER SIDE is in a box,a coin is taken at random and FOUND HEAD IN ONE SIDE .what is the probability that THE OTHER SIDE IS HEAD?

1259


which country is following one party system

2466