Exam 11: Advanced Inheritance Concepts

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which of the following is NOT true regarding abstract methods?

(Multiple Choice)
4.9/5
(42)

How is the Object class equals() method implemented?

(Essay)
4.9/5
(36)

public abstract class Car {     private String model;     public abstract void color();     public String getName()     {         return model;      }      public void setName(String carModel)      {         model = carModel;       } } Using the code above, would it be possible to create a class in which you declare a Car object with the statement Car myCar = new Car("Honda"); ? Explain why or why not.

(Essay)
4.8/5
(25)

When you create a new subclass in Java, neither the superclass source code nor the superclass ____ is changed.

(Multiple Choice)
4.9/5
(41)

public class Animal { } public class Animal extends Object { } The two class declarations above have identical outcomes. Explains why this is the case.

(Essay)
4.8/5
(32)

       The equals() method returns a boolean value indicating whether two objects are equal. Using the above code, will the two BankAccount objects be equal? Explain why or why not.        The equals() method returns a boolean value indicating whether two objects are equal. Using the above code, will the two BankAccount objects be equal? Explain why or why not. The equals() method returns a boolean value indicating whether two objects are equal. Using the above code, will the two BankAccount objects be equal? Explain why or why not.

(Essay)
4.7/5
(34)
Showing 61 - 66 of 66
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)