20
(Choose 2 answers)
Shape and Main are defined in the same package, examine the code and select the correct statements.(select 2)
A. The class Main will print Shape.
line2>public void print() {
line1> class Shape {
line3>System.out.println("Shape");
B. If the code on line 2 is changed as follows, the class Main will print Shape:
line4>
}
private void print() {
line6> class Main {
line5> }
C. If the code on line 2 is changed as follows, the class Main will print Shape:
line7>line8>public static void main(String... args) { Shape anShape = new Shape();
void print() {
line9>anShape.print();
line10>}
D. If the code on line 2 is changed as follows, the class Main will print Shape:
line11> }
default void print() {