⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 treemapcl.java

📁 online shopping project
💻 JAVA
字号:
class treemapcl{
  public static void main(String args[])
  {
    TreeMap tm=new TreeMap();
    tm.put("Ravi",new Double(345.35));
    tm.put("Raju",new Double(12.45));
    tm.put("Ram",new Double(90.25));
    
    Set s=tm.entrySet();
    Iterator i=set.iterator();
 
   while(i.hasNext()){
     Map.Entry m=(Map.Entry)i.next();
     System.out.print(m.getKey()+" ");
     System.out.println(m.getValue());
   }
   System.out.println();
   double d=((Double)tm.get("Ravi")).doubleValue();
   tm.put("Ravi",new Double(d+100));
   System.out.println("new value of Ravi:"+tm.get("Ravi"));
 }
}

  
    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -