PRO192_-_S6_-_FA_2023_-_FE_1038.webp
V

PRO192_-_S6_-_FA_2023_-_FE_1038.webp

(Choose 1 answer)
What is the output of the following program?
class Bird {
String place,color; int weight;
Bird() { weight=1; }
Bird(String place, String color) { this.place-place; this.color=color;this.weight=2;
B. (null, null.0) (Hola, blue, 0)(Hola, blue, 5)
Bird(String place, String color, int weight) {
this.place-place; this.color-color; this.weight-weight;
C. (null, null, 1) (Hola, blue, 0)(Hola, blue, 5)
} public String toString() {
D. (null, null.0) (Hola, blue. 2)(Hola, blue, 5)
return("("+place+" "+color+" "+weight+") ");}
public class Main {
Bird x, y, z;x = new Bird();
}
A. (null, null, 1) (Hola, blue. 2)(Hola, blue, 5)
public static void main(String[] args) { y = new Bird("Hola","blue");z = new Bird("Hola","blue",5);System.out.print(x);System.out.print(y);System.out.print(z);System.out.println();


Exit 25

Thông tin

Category
PRO192
Thêm bởi
vanthang97
Ngày thêm
Lượt xem
4,183
Lượt bình luận
20
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRO192_-_S6_-_FA_2023_-_FE_1038.webp
File size
67.3 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom