把test.java救回来了

This commit is contained in:
2024-06-11 01:53:01 +08:00
parent d085000064
commit d753356d40
54 changed files with 1309 additions and 1297 deletions
+11 -11
View File
@@ -1,12 +1,12 @@
//HelloCollections.java
package task1;
import java.util.ArrayList;
public class HelloCollections {
public ArrayList run() {
ArrayList<String> list = new ArrayList<>();
list.add("hello, world");
return list;
}
//HelloCollections.java
package task1;
import java.util.ArrayList;
public class HelloCollections {
public ArrayList run() {
ArrayList<String> list = new ArrayList<>();
list.add("hello, world");
return list;
}
}
+12
View File
@@ -0,0 +1,12 @@
//test.java
package task1;
import java.util.ArrayList;
public class test {
public static void main(String[] args) {
HelloCollections h1 = new HelloCollections();
ArrayList a1 = h1.run();
System.out.println(a1);
}
}