我无法弄清楚如何按字母顺序放置String[][]
商店阵列,查看第二栏,其中包括礼品,学习用品教科书和校园装备。
我非常感谢你的帮助。
**
String[][] store = {
{"Alumni Drink ware", "Gifts", "$25.00"},
{"Binders", "School Supplies", "$3.00"},
{"Book bag", "School Supplies", "$20.00"},
{"Fabulous Desserts", "Textbooks", "$25.00"},
{"Folders", "School Supplies", "$1.00"},
{"Gift Cards", "Gifts", "$25.00"},
{"Highlighters", "School Supplies", "$2.00"},
{"Jacket", "Campus Gear", "$65.00"},
{"JAVA Programming", "Textbooks", "$150.00"},
{"Network Solutions", "Textbooks", "$75.00"},
{"Pencils", "School Supplies", "$1.00"},
{"Pens", "School Supplies", "$2.00"},
{"Shorts", "Campus Gear", "$10.00"},
{"Sweatshirts", "Campus Gear", "$40.00"},
{"T-shirts", "campus Gear", "$15.00"},
{"Web Design Ideas", "Textbooks", "$55.00"}};
**这是我的数组在显示时的外观。我试图对第二列进行排序或使用它对数组进行排序。 **
Alumni Drink ware Gifts $25.00
Binders School Supplies $3.00
Book bag School Supplies $20.00
Fabulous Desserts Textbooks $25.00
Folders School Supplies $1.00
Gift Cards Gifts $25.00
Highlighters School Supplies $2.00
Jacket Campus Gear $65.00
JAVA Programming Textbooks $150.00
Network Solutions Textbooks $75.00
Pencils School Supplies $1.00
Pens School Supplies $2.00
Shorts Campus Gear $10.00
Sweatshirts Campus Gear $40.00
T-shirts campus Gear $15.00
Web Design Ideas Textbooks $55.00