Item       item; String     sell, sold; Collection currentItemList, pastItemList;
Item         item; StringBuffer sell = new StringBuffer(); Collection   currentItemList, pastItemList;
  public String listItem(Integer userId, ItemHome iHome)   {    Item       item;    String     sell, sold;    Collection currentItemList, pastItemList;    try     {      currentItemList = iHome.findUserCurrentSellings(userId);      pastItemList = iHome.findUserPastSellings(userId);    }    catch (Exception e)    {      throw new EJBException("Exception getting item list: " +e+"<br>");    }    if ((currentItemList == null) || (currentItemList.isEmpty()))    {       sell = "<br>";       sell = sell.concat(printHTMLHighlighted("<h3>You are currently selling no item.</h3>"));    }    else    {      // display current sellings      try      {        sell = printSellHeader("Items you are currently selling.");        Iterator it = currentItemList.iterator();        while (it.hasNext())         {          // Get the name of the items            item = (Item)it.next();          // display information about the item          sell = sell.concat(item.printSell());        }        sell = sell.concat(printItemFooter());      }      catch (Exception e)       {        throw new EJBException("Exception getting item: " + e +"<br>");      }    }    if ((pastItemList == null) || (pastItemList.isEmpty()))    {      sold = "<br>";      sold = sold.concat("<h3>You didn't sell any item.</h3>");      return sell.concat(sold);    }    // display past sellings    sold = "<br>";    sold = sold.concat(printSellHeader("Items you sold in the last 30 days."));    try    {      Iterator it = pastItemList.iterator();      while (it.hasNext())       {        // Get the name of the items        item = (Item)it.next();        // display information about the item        sold = sold.concat(item.printSell());      }      sold = sold.concat(printItemFooter());    }    catch (Exception e)     {      throw new EJBException("Exception getting item: " + e +"<br>");    }    return sell.concat(sold);  }