- 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 } } }
1 Answer
+ 1
Hi, please show us your attempt.