- passive income - passive income

Types of Classes in Java

Types of Classes in Java

Java is an Object Oriented Programming language intended for taking care of genuine issue utilizing class and article. What's more, known as stage free language. 

Class:- Simply the name itself depict that a class is the arrangement of things. The class is the most ideal approach to separate things. 

A class is characterized as an accumulation of information as like structure in "C" language. 

As indicated by the OOPs class is the diagram/layout of an article. It gives the state and conduct to an item. 

In Java, there are different kind of class that exists in a different bundle. 

Following figure demonstrate the quantity of class in Java. 

Types of Classes in Java

Some of the basic sorts of class in Java are as follows:- 

➤ Wrapper Class:-

➤ Changeable Class:-

➤ Theoretical Class:-

➤ Last Class:-

➤ Mysterious Class:-

➤ Information Output Class:-

➤ String Class:-

➤ Framework Class:-

➤ System Class

As per Access Modifier four kind of class:-

Open Class, Private Class, Protected Class, Default Class.

As per Inheritance:-

Dinner Class, SubClass.

There is such a large number of classes in java however kinds of classes are 3 as pursues :

Simple class

class MyClass{


➤ Theoretical class

abstract class MyClass{


➤ Java Inner Class

Java Inner Classe 

Java internal class or settled class is a class which is proclaimed inside the class or interface. 

We utilize internal classes to sensibly aggregate classes and interfaces in a single spot with the goal that it very well may be progressively comprehensible and viable. 

Also, it can get to every one of the individuals from an external class including private information individuals and techniques. 

Punctuation of Inner class

class Java_Outer_class{


class Java_Inner_class{




The preferred standpoint of java inward classes

There are essentially three focal points of inward classes in java. They are as per the following: 

1) Nested classes speak to an exceptional kind of relationship that is it can get to every one of the individuals (information individuals and techniques) of an external class including private. 

2) Nested classes are utilized to grow increasingly decipherable and viable code since it legitimately assembles classes and interfaces in a single spot as it were. 

3) Code Optimization: It requires less code to compose.
Types of Classes in Java Types of Classes in Java Reviewed by Raj Aryan on March 26, 2019 Rating: 5

1 comment:

Powered by Blogger.