Page 2 of 2 FirstFirst 12
Results 21 to 23 of 23
  1. #21
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by rjuyal View Post
    HashMap<String,Object> h

    this feature was not in 1.4 :cool:
    in 1.4 we have to write:

    HashMap h
    Yep, that's true. But still you get the warning buddy.

  2. #22
    rjuyal's Avatar
    rjuyal is offline Senior Member
    Join Date
    Mar 2008
    Location
    Delhi, India
    Posts
    194
    Rep Power
    7

    Default why it will do so

    here is why it will do so,
    Type Erasure (The Java™ Tutorials > Learning the Java Language > Generics)

    but even now, i don't know what is the logic :(
    i am the future

  3. #23
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    7

    Default

    Quote Originally Posted by jeer View Post
    I am compiling and running my code using same java version. if i use
    HashMap h
    then there following error:
    Note: HashMapTest.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    Try to compile it on terminal/cmd.

    Try to post the warnings here.
    freedom exists in the world of ideas

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Stack push/pop/peek operations
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-29-2008, 09:03 AM
  2. String operations..
    By sireesha in forum New To Java
    Replies: 4
    Last Post: 12-14-2007, 02:04 AM
  3. Uses unchecked or unsafe operations message
    By Robbinz in forum New To Java
    Replies: 2
    Last Post: 12-06-2007, 10:56 PM
  4. UnChecked Exception
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-18-2007, 07:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •