Constructors in Java- Type Overloading and examples

A Constructor in a special method that is used to initialize the object. Constructor name should be same as class name. Constructors does not have any return type.

While creating object of above class we use

Here new is used to create object and after then the constructor Student() is get called it … Read more

Java Classes and Objects

Class A class forms the basis for object-oriented programming. It defines the shape and nature of the object. Any concept that we want to implement in oop’s must be encapsulated within a class. A class is a template for an object and an object is an instance for a class. In another words class is … Read more

Java Keywords

Java contains 53 reserved words out of which 50 are keywords. Out of 50, only 48 keywords are used and two keywords const and goto are not in use, and 3 are literals values true, false, and null. These reserved words can not be used as identifiers. Java Keywords    The keyword is a reserved word that … Read more

Switch Statement in Java

Switch Statement in Java provides a way to select one option among multiple options. In Java switch statement it provides multiple case statement  based on switch expression the appropriate case statement is get executed Syntax of switch statement

The switch expression work with primitive byte short int, char and with its wrapper class, enum … Read more