Tutorials

Hashcode() and CLone() – Methods of Object Class in Java

We have already discussed about the toString() method so now we will explain the remaining 10 methods of Object class in java.lang package. 2) hashCode(): Prototype of this method is public native int hashCode() In java, JVM assigns one unique id to every object through which we can represent it in the memory. This unique …

Hashcode() and CLone() – Methods of Object Class in Java Read More »

Object Class in Java – java.lang package

After java.util package, java.lang package is another java package that is used most by the programmers. This package is by default imported in the java program, therefore it is not required to import it explicitly. Some of the most commonly used class in this package are: Object String StringBuilder StringBuffer Wrapper Classes Now discussing these …

Object Class in Java – java.lang package Read More »