Wrong Following Printdog Method Public Class Dog Private String Name Private Int Age Publi Q37280742

What is wrong with the following printDog method? public class Dog private String name; private int age; public void printDog

What is wrong with the following code? string book The Great Gatsby; double price-14.99; int pages 192; $%.2f pages); Syste

What is wrong with the following printDog method? public class Dog private String name; private int age; public void printDog(String name, int age) System.out.printin(nameis ageyears old”) nothing is wrong with this method You cannot print out name and age because they are both private fields It should return a value It should not have any parameters

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.