Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
アシスタントの配列リストを作成しました (文字列名、int 給与)
リストにいくつ追加しても、すべてのアシスタントを出力するメソッドを作成したいと思います。
時間が来たら、実行ファイルからメソッドを呼び出せるようにしたいです。
そのメソッドを作成するにはどうすればよいですか?
前もって感謝します
ArrayList 定義が次のようであると仮定します: ArrayList asstList
private void PrintAssistnatList() { for(Assistant asst:asstList) { System.out.println("Name: "+asst.name+" salary: "+salary); } }