An exception is an unwanted or unexpected event which occurs during execution of a program and breaks the normal flow of program. It normally happens due to some edge cases mistake by programmer , java provides various way by which we can handle that exception and will make sure that rest of the program after that exception will successfully executed , if we not handle that exception then rest of the code of that program will not executed.

Exception Hierarchy

All exceptions and errors are sub-class of class Throwable which is the base class of the hierarchy.

Advantage of Exception Handling

The main advantage of exception…

Object-Oriented Programming (OOP) refers to a type of programming in which programmers define the data type of a data structure and the type of operations that can be applied to the data structure.

OOPs Concepts — Table of Contents

What is a Class ?

What is an Object ?

Constructors in java

Object Oriented Programming Principles

  • Inheritance
  • Encapsulation
  • Abstraction
  • Polymorphism

1) What is a Class?

A class is a group of objects which have common properties. It is a template or blueprint from which objects are created. It is a logical entity. Class in Java determines how an object will behave and what the object will contain.

Syntax :

class <class_name>{…

Shahbaj Ansari

4th Year CSE student at Neotia Institute of Technology Management and Science | Roll No. : 14400117016

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store