This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes List initialization syntax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "List initialization syntax" Watch "List initialization syntax" New topic
Author

List initialization syntax

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi Folks,

what is the difference between



and



please explain
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

The first one allows you to create an anonymous class, subclass of ArrayList, where you can override the superclass methods.


[My Blog]
All roads lead to JavaRanch
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

thanks Christophe Verré
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: List initialization syntax
 
Similar Threads
polymorphical issue on collection
What this code does?
Generics
Polymorphic Declaration
K&B generics doubt