为了账号安全,请及时绑定邮箱和手机立即绑定

我应该如何使用用户输入从多维数组中存储数组

我应该如何使用用户输入从多维数组中存储数组

繁花如伊 2021-10-28 16:55:46
是的,这是我的作业。但我被卡住了,已经好几天了。(可怕的老师,可怕的教训。这位老师永远不会回应我或任何人的任何事情)我以前在这里见过这样的事情,但从未见过或理解他们的答案。在这个程序中,用户输入一个状态,然后输出状态鸟和它的花。在用户输入 none 之后,它应该给他们一个他们连续输入的所有内容的摘要。状态,鸟,花。我不知道如何做到这一点......你不必告诉我如何,那很好。但是你能不能以一种非模糊的方式指导我,哈哈。import java.util.Scanner;public class TheStatesTester {public static void main(String[] args) {    String theState [][] =  {            {"Alabama", "Northern Flicker","Camelia"},            {"Alaska", "Willow PTarmigan","ForgetMeNot"},            {"Arizona", "Cactus Wren","Saguaro Cactus Blossom"},            {"Arkansas", "Mockingbird","Apple Blossom"},            {"California", "California Quail","California Blossom"},            {"Colorado", "Lark Bunting","Rocking Mountain Columbine"},            {"Connecticut", "American Robin","Mountain Laurel"},            {"Delaware", "Blue Hen Chicken","Peach Blossom"},            {"Flordia", "Mockingbird","Orange Blossom"},            {"Georgia", "Brown Thrasher","Cherokee Rose"},            {"Hawaii", "Nene","Hibiscus"},            {"Idaho", "Peregrine Falcon","Mock Orange"},            {"Illinois", " Northern Cardinal","Purple Violet"},            {"Indiana", "Northern Cardinal","Peony"},            {"Iowa", "Eastern Goldrinch","Wild Prairie Rose"},            {"Kansas", "Western Meadowlark","Sunflower"},            {"Kentucky", "Northen Cardinal","Golden Rod"},            {"Louisiana", "Brown Pelican","Magnolia"},            {"Maine", "Black-capped Chickadee","White Pine Tassel and Cone"},            {"Maryland", "Baltimore Oriole","Black-Eyes Susan"},            {"Massachusetts", "Black-Capped Chickadee","Mayflower"},        };
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 113 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信