Java - Combining two arrays? -
what i'm trying ask user list of items, , create 2 arrays - 1 itemname , 1 itemprice. program right deals itemprice , there's no indication of how can combine 2 arrays in 1 output list of both arrays combined, this: bread - 1.20 milk - 2.00 here have far, 2 arrays, name array isn't included in anything. thanks! public class taxclass { private input newlist; /** * constructor objects of class tax * enter number of items */ public taxclass(int anyamount) { newlist = new input(anyamount); } /** * mutator method add items , cost * enter sales tax percentage */ public void additems(double anytax){ double salestax = anytax; newlist.setarray(salestax); } } public class input { private scanner keybd; private string[] costarray; private string[] itemarray; /** * constructor objects of class scanner */ public input(int anyamountofitems) { keybd = new scanner(system.in); costarray = new string[anyamountofitems]; itemarray = new string[an