PRO192_-_SU_2023_-_Block_5_-_RE_753.webp
Mai Linh 2001

PRO192_-_SU_2023_-_Block_5_-_RE_753.webp

OD
(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.
line1> class Shape { line2>public void print() {
line3>System.out.println("Shape");
line4>
B. If the code on line 2 is changed as follows, the class Main will print Shape:
line5> }
}
line6> class Main {
private void print() {
line8>public static void main(String... args) { Shape anShape = new Shape();
line7>
line9>
C. If the code on line 2 is changed as follows, the class Main will print Shape:
line10>}
void print() {
line11> }
anShape.print();
D. If the code on line 2 is changed as follows, the class Main will print Shape:
default void print() {
wi

Thông tin

Category
PRO192
Thêm bởi
Mai Linh 2001
Ngày thêm
Lượt xem
1,905
Lượt bình luận
15
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRO192_-_SU_2023_-_Block_5_-_RE_753.webp
File size
61.8 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom