Question: Question 8 public class Mobile private String brand: private int releaseYear, public boolean hasAccessories: public static int numof Mobiles = 0; private static int releasedAfter2018
Question 8 public class Mobile private String brand: private int releaseYear, public boolean hasAccessories: public static int numof Mobiles = 0; private static int releasedAfter2018 - 0; : Question: Which of the methods is right for getBrand to get the attribute brand of a Nobile object from other class: private void getBrand 0 { return brand; } private String getBrand 0 { return brand; } public String getBrand of return brand; } private String getBrand (String br) { return br; } public String getBrand (String br) { return br:) public void getBrand return brand
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
