I need a way to print 3 these arrays...
public static void viewCatalog(){
String[] description = new String[15];
description[0]= "Alumni Drink ware";
description[1]= "Binders";
description[2]= "Bookbag";
description[3]= "Fabulous Desserts";
description[4]="Folders";
description[5]="Gift Cards";
description[6]="Highlighters";
description[7]="Jackets";
description[8]="JAVA Programming";
description[9]="Network Solutions";
description[10]="Pencils";
description[11]="Pens";
description[12]="Shorts";
description[13]="Sweatshirts";
description[14]="Tshirts";
description[15]="Web Design Ideas";
String[] category = new String[15];
category[0]= "Gifts";
category[1]= "School Supplies";
category[2]= "School Supplies";
category[3]= "Textbooks";
category[4]="School Supplies";
category[5]="Gifts";
category[6]="School Supplies";
category[7]="Campus Gear";
category[8]="Textbooks";
category[9]="Textbooks";
category[10]="School Supplies";
category[11]="School Supplies";
category[12]="Campus Gear";
category[13]="Campus Gear";
category[14]="Campus Gear";
category[15]="Textbooks";
double[] price = new double[15];
price[0]= 25.00;
price[1]= 3.00;
price[2]= 20.00;
price[3]= 25.00;
price[4]=1.00;
price[5]=25.00;
price[6]=2.00;
price[7]=65.00;
price[8]=150.00;
price[9]=75.00;
price[10]=1.00;
price[11]=2.00;
price[12]=10.00;
price[13]=40.00;
price[14]=15.00;
price[15]=55.00;
System.out.println(Arrays.toString(description));
System.out.println(Arrays.toString(category));
System.out.println(Arrays.toString(price));
}
In this method...
public static void sort(){
System.out.println("How would you like to sort?");
System.out.println("a) Increasing Price \n"
+ "b) Decreasing Price \n"
+ "c) Description \n"
+ "d) Category \n"
+ "Option: ");
Scanner input = new Scanner(System.in);
String option=input.next();
if (option=="a") {
}
}
I need to be able to print them in varying orders, but right now I can't get them to print at all. I keep getting errors that say "class not found" etc. I've tried to pass by value but I don't think I'm doing it right. Please help! I'm not good at Java by any means and need all of the help that I can get.