Given the code fragment:

Which two code fragments are valid at line 2?
Select all that apply, then click Submit answer.
-
○
for (int count = 0; count < 5; count++) {
System.out.print(count);
} -
○
package p1;
-
○
import java.util.*; public void display() { List
nums = new ArrayList<> ();
} -
○
{
private int num;
}
-
○
private String name = “John”;
public void display() { System.out.print(name);
}