What are the non-final functions in java object class?, JAVA Programming

 

The non-final functions are clone (), finalize (), toString (), equals (), hashCode () and. The other methods like wait (), getClass (), notifyAll (), notify () etc are final functions and therefore cannot be overridden.  

  The hashCode() and equals() methods have to be very important, when objects implementing these two functions are added to collections. If not implemented or implemented incorrectly at all then your objects added in a collection like a Set, Map or List can behave strangely and also is hard to debug.

 

Posted Date: 7/25/2012 1:36:47 AM | Location : United States







Related Discussions:- What are the non-final functions in java object class?, Assignment Help, Ask Question on What are the non-final functions in java object class?, Get Answer, Expert's Help, What are the non-final functions in java object class? Discussions

Write discussion on What are the non-final functions in java object class?
Your posts are moderated
Related Questions
Java has two kinds of exceptions: 1. Checked exception: handled from java.lang.Exception but not java.lang.RuntimeException. 2. Unchecked exception: handled from java.lang.Ru

A socket is one end-point of a two-way communication link among two programs running on the network. A socket is bound to a port number so that the TCP layer can recognize the appl

Explain the Three Benefits of Access Protection ? Access protection has three major benefits: 1. It permits you to enforce constraints on an object's state. 2. It gives a si

Differentiation between an Applet and an Application ?

List down the Analytical Engine's elements name An analytical engine elements are as follows: Input Memory Processor Output.

Padovan String

Problem description: A travelling salesman wants to make a tour of the cities and returns back to the starting point. What is the minimum length tour? Formal Definiti

The hashCode() and equals() methods have to be very important, when objects implementing these two functions are added to collections. If not implemented or implemented incorre

The fancy new French restaurant La Food is very popular for its authentic cuisine and high prices. This restaurant does not take reservations. To help improve the efficiency of the

Why do we need wrapper classes? It is sometimes simpler to deal with primitives as objects. Moreover most of the collection classes keep objects and not primitive data types. A