dinesh Archive

Polymorphism in Java

The dictionary definition of polymorphism refers to a principle in biology in which an organism or species can have many different forms or stages. This principle can also be applied to object-oriented programming and languages …

Java Inheritance

In this section, you will learn about the inheritance with an example and its description. Different kinds of objects often have a certain amount in common with each other. Mountain bikes, road bikes, and tandem …

Constructors in Java

A java constructor has the same name as the name of the class to which it belongs. Constructor’s syntax does not include a return type, since constructors never return a value. Constructors may include parameters …

Methods in Java

A Java method is a collection of statements that are grouped together to perform an operation. When you call the System.out.println method, for example, the system actually executes several statements in order to display a …

Java – String valueOf() Method

Description: This method has followings variants which depends on the passed parameters. This method returns the string representation of the passed argument. valueOf(boolean b): Returns the string representation of the boolean argument. valueOf(char c) : …