- 4

Modify the missing lines and excute the program

public class Dog {    String breed;    int age;    String color;    void barking() {    System.out.println("barking...");    }    void hungry() {    System.out.println("eat some stuff...");    }    void sleeping() {   System.out.println("sleep time...");    }    void display() {    System.out.println("breed"+breed);       System.out.println("age"+age);   System.out.println("color"+color); } class DogDriver { public static void main(String a[]) { //write code for object creation //call properties and methods } } }

11th Jul 2021, 6:59 PM
Gudditi Anjaneyulu
Gudditi Anjaneyulu - avatar
1 Réponse
+ 1
Hi, please show us your attempt.
11th Jul 2021, 7:19 PM
Lisa
Lisa - avatar