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.
我制作了一个助手的 Arraylist(字符串名称,int 工资)
我想创建一个方法来打印出所有的助手,不管我们在列表中添加了多少。
我希望能够在时间到期时从我的运行文件中调用该方法。
我将如何制作这种方法?
提前致谢
假设 ArrayList 定义为:ArrayList asstList
private void PrintAssistnatList() { for(Assistant asst:asstList) { System.out.println("Name: "+asst.name+" salary: "+salary); } }