HashMap Operation:traverse

 

  HashMap al = dictManager.getK3CompanyMap();
   Iterator it = (al.entrySet()).iterator()  ;
   while (it.hasNext()) {
    Map.Entry  e = (Map.Entry) it.next() ;
  System.out.println(e.getKey()+" : "+e.getValue());
   }
   System.out.println("successfully finished!");

or

Set subTotalSet = subTotal.keySet();
      subTotal.entrySet().iterator()
   Iterator it = subTotalSet.iterator();
   double sumCrossTotal = 0.0;
   double sumHours = 0.0;
   while (it.hasNext()) {

相关帖子:
  • No Related Posts
  • micas Jun 13th 2005 10:08 pm Enabling-tech No Comments yet Trackback URI Comments RSS

    Leave a Reply

    You must be logged in to post a comment.