把test.java救回来了
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user