PRO192_-_SU_2023_-_Block_5_-_FE_735.webp
successful_man

PRO192_-_SU_2023_-_Block_5_-_FE_735.webp

42
(Choose 1 answer)
A. (null, null, 1) (Hola, blue, 0) (Hola, blue, 5)
B. (null, null, 1) (Hola, blue, 2) (Hola, blue, 5)
C. (null, null, 0) (Hola, blue. 2) (Hola, blue, 5)
D. (null,null.0) (Hola, blue, 0) (Hola, blue, 5)
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;
Bird(String place, String color, int weight) {
this.place-place; this.color=color; this.weight-weight;
} public String toString() {
return("("+place+","+color+","+weight+") ");}
public class Main {
public static void main(String[] args) {
Bird x, y, z;
x = new Bird();
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();

Thông tin

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

Image metadata

Filename
PRO192_-_SU_2023_-_Block_5_-_FE_735.webp
File size
67.4 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom