• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

collection classes

 
mansi gupte
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried compling this program but got errors while using add() , i am sure that this method is not deprecated according to java 2, can someone clarify this?

thnks ,
piya

 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Priya! Welcome to javaranch.

First of all the program compiles fine. It just gives a warning as you have not used generics in your code. After Java 5, non generic collections are considered type unsafe. So it will only give warning and not error.

Also your display name is not according to the javaranch naming policy. So please change it...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic