Java Tip to Initialize ArrayList in One Line
|Top Tutorials||New Tutorials||Submit||Login||Register|
Total Hits: 6940
Total Votes: 141 votes
Submitted on: 2013-11-21 08:32:32
Submitted By: Javin Paul
Description:We all use ArrayList for different purpose, but how do we add data into ArrayList, by calling add() method. Well, there is a nice Java tip which allows you to initialize ArrayList in the same line, where you are creating instance of it. This article demonstrate that tip with a simple example. More detail...