Results 1 to 2 of 2
  1. #1
    überfuzz is offline Member
    Join Date
    Feb 2011
    Posts
    43
    Rep Power
    0

    Default Working with a TreeMap

    I'm writing a program where stuff is placed in a treemap. I've gotten the map to work so that I can place stuff in it and evaluate it. However, when I want to place stuff in it in a static fashion I miss the syntax, I think. Pleace point out any other faults to.

    Java Code:
      private TreeMap<String, Sexpr> variables;
       ... 
    
        variables = new TreeMap<String, Sexpr>();
       ... 
    
       variables.put(String e, Sexpr Math.E);

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,589
    Rep Power
    23

    Default Re: Working with a TreeMap

    when I want to place stuff in it in a static fashion I miss the syntax
    What errors does the compiler give you? Those messages often say what the problem is.

    Also read the API doc for the method you are trying to use.
    Java Platform SE 6

Similar Threads

  1. TreeMap problem
    By Tolls in forum Advanced Java
    Replies: 10
    Last Post: 08-31-2011, 02:58 PM
  2. TreeMap vs Map
    By alpdog14 in forum New To Java
    Replies: 5
    Last Post: 03-27-2011, 06:07 PM
  3. [JAVA] TreeMap
    By watle in forum Advanced Java
    Replies: 3
    Last Post: 03-16-2011, 05:39 PM
  4. Treemap's
    By Russo in forum New To Java
    Replies: 6
    Last Post: 10-11-2009, 01:13 AM
  5. How to use treemap
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-12-2008, 08:47 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
  •