public String viewByItemCode(String icode)
{
String search = " ";
for( ; x<recordNum ; x++)
{
if(itemRef[x].getItemCode() == icode)
{
search = ("\nItem Code: " +itemRef[x].getItemCode()+ "\nItem Description: " +itemRef[x].getItemDesc()+ "\nItem Unit Price: "
+itemRef[x].getItemUnitPrice()+ "\nItem Quantity: " +itemRef[x].getItemQty()+ "\nItem Unit Measure: "
+itemRef[x].getItemUnitMeasure()+"\n");
}
}
return search;
}
Supposed to return a record placed in a String so I can print it in main, but it doesn't work. :( Help?