Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Generic Collections  RSS feed

 
vendikonda sravan
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i didn't get why the line below is not leagal

"List<Animal>animals=new ArrayList<Animal>(); "
can anyone help me understand that

thanks
 
Henry Wong
author
Sheriff
Posts: 22837
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am assuming that you are concluding that the line is not legal due to a compile error? Can you show us what the error is?

Henry
 
vendikonda sravan
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the replay but it yes was some syntactical compilation error as you said have corrected it & it works .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!