aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Method Overloading and Method Overriding
  • Which class does not override the equals() and hashCode()...
Multiple choice

Which class does not override the equals() and hashCode() methods, inheriting them directly from class Object?

  1. java.lang.String

  2. java.lang.Double

  3. java.lang.StringBuffer

  4. java.lang.Character

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

java.lang.StringBuffer is the only class in the list that uses the default methods provided by class Object.

Keep practicing — related questions

  • Which two statements are true about properly overridden hashCode() and equals() methods? 1. hashCode() does...
  • Which method is not overridden by Annotation interface?
  • Which statements are true about comparing two instances of the same class, given that the equals() and hash...
  • Which two statements are true about comparing two instances of the same class, given that 1. the equals() a...
  • Given: 1. public class Person { 2. private String name; 3. public Person(String name) { this.name = name; }...
  • Given: 1. public class Person { 2. private String name; 3. public Person(String name) { this.name = name; }...
  • Which of these methods are found in the Object Class?
  • Which of the following methods of the Object class cannot be overriden in java?
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Java Core Classes and Threads (1473 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy