i have a method that will take int i and put it into the arrays and repeat i times, but i only wantstatic void updateSharePrice(int i){//Start of updateSharePrice method System.out.println("Here is your current list of stocks : \n"); System.out.print("\t\t\t\tBought Current Stock\n"); System.out.println("Stock Name\tSymbol\tUnits\tPrice\tPrice\tValue "); System.out.print("----------\t------\t-----\t-----\t-----\t-----\n"); System.out.print(stockName[i]+"\t"+stockSym[i]+"\t"+unitBought[i]+"\t"+unitPrice[i]); }//End of updateSharePrice methodto repeat i times, how can i do it??System.out.print(stockName[i]+"\t"+stockSym[i]+"\t"+unitBought[i]+"\t"+unitPrice[i]);
i meant this
This is your current stocks that you have:
stock1 at 5 dollar each
stock2 at 6 dollar each
stock3
stock4
etc...