My Blog

My WordPress Blog

My Blog

My WordPress Blog

9. Java OOPs Misc

Difference between method overloading and method overriding in java

There are many differences between method overloading and method overriding in java. A list of differences between method overloading and method overriding are given below: No. Method Overloading Method Overriding 1) Method overloading is used to increase the readability of the program. Method overriding is used to provide the specific implementation of the method that is already provided by […]

Difference between object and class

There are many differences between object and class. A list of differences between object and class are given below: No. Object Class 1) Object is an instance of a class. Class is a blueprint or template from which objects are created. 2) Object is a real world entity such as pen, laptop, mobile, bed, keyboard, mouse, chair etc. Class is a group […]

Creating API Document | javadoc tool

We can create document api in java by the help of javadoc tool. In the java file, we must use the documentation comment /**… */ to post information for the class, method, constructor, fields etc. Let’s see the simple class that contains documentation comment. To create the document API, you need to use the javadoc tool followed […]

Wrapper classes in Java

The wrapper class in Java provides the mechanism to convert primitive into object and object into primitive. Since J2SE 5.0, autoboxing and unboxing feature convert primitives into objects and objects into primitives automatically. The automatic conversion of primitive into an object is known as autoboxing and vice-versa unboxing. Use of Wrapper classes in Java Java is an object-oriented programming language, so we […]

Java Math class

Java Math class provides several methods to work on math calculations like min(), max(), avg(), sin(), cos(), tan(), round(), ceil(), floor(), abs() etc. Unlike some of the StrictMath class numeric methods, all implementations of the equivalent function of Math class can’t define to return the bit-for-bit same results. This relaxation permits implementation with better-performance where […]

Object Cloning in Java

The object cloning is a way to create exact copy of an object. The clone() method of Object class is used to clone an object. The java.lang.Cloneable interface must be implemented by the class whose object clone we want to create. If we don’t implement Cloneable interface, clone() method generates CloneNotSupportedException. The clone() method is defined in the Object class. Syntax of […]

Scroll to top