PRO192_-_C2_-_FE_-_SU_2023_398.webp
T

PRO192_-_C2_-_FE_-_SU_2023_398.webp

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

Thông tin

Category
PRO192
Thêm bởi
Thái Dương1
Ngày thêm
Lượt xem
3,049
Lượt bình luận
15
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRO192_-_C2_-_FE_-_SU_2023_398.webp
File size
63.9 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom