Learn Pain Less

HomeOur TeamContact
Types of Java classes
Pawneshwer Gupta
Pawneshwer Gupta
March 19, 2015
1 min

Table Of Contents

Built in Classes :
User Defined Classes :
Types of Java classes

JAVA classes are of two types :

  1. Built in Classes
  2. User Defined Classes

Built in Classes :

Built in JAVA Classes are Predefined Classes. Predefined Class means those Classes which are not created by us. (In simple words we can say JAVA Virtual Machine provide some classes with features) that classes are called as Predefined JAVA Classes.

for example :

  • String
  • System
  • InputStream
  • Reader

there are thousands of classes are available in JAVA World. Each and every class have its own property.

for Example:

String class is used to create normal Strings. if you don’t know what is string, then don’t need to worry about it I will explain this in Strings chapter. for now “hello world” everything written in double quotes ("") is called as String. if you have some basic knowledge about C or C++ language then you will understand what is String. And in String class it have some other features like :

  • if you want to convert “Hello World” to “HELLO WORLD” then you don’t need to type by your self, you can use String class’s feature to make whole sentence in Uppercase.
  • you can break “Hello World” into “hello” “world”.

So this is just basic knowledge about what are Built in classes, and why we need built in classes.

Why we need Built in classes in JAVA :

We need built in Classes in every Programming language, Programming language without Classes are incomplete. Below are cases when you need Built in classes to complete out task.

  • To create strings we need to use String Class.
  • To print something we need System class.
  • To read something from user’s input we need Reader class.
  • To create file or folder using JAVA we need File class.

and so on. So this is real definition of Built in classes in every Programming language.

User Defined Classes :

Those classes which are created by us. Or those classes which we created to reuse in future, is called as User defined classes.

for example : Hello,Abc,Demo etc. these classes are not defined by JAVA itself. we made these classes to use in future or combine everything in a single class.

Let see how to create a simple class :

class Hello{

this is syntax of creating class in JAVA. I will explain in detail about creating class in JAVA.

Subscribe to our newsletter!

We'll send you the best of our blog just once a month. We promise.


startcore java


Pawneshwer Gupta

Pawneshwer Gupta

Software Developer

Pawneshwer Gupta works as a software engineer who is enthusiastic in creating efficient and innovative software solutions.



Social Media

Related Posts

Working with Files, Folders java
Working with Files, Folders java
March 25, 2015
1 min
Learn Pain Less  © 2024, All Rights Reserved.
Crafted with by Prolong Services

Quick Links

Advertise with usAbout UsContact Us

Social Media