Class in Java and Object oriented programming language - Video Tutorial

Class and Object are two pillars of Java programming language. There are multiple ways you can describe Class in Java, for someone  Class is a user defined type, for others it's blueprint to create objects and for few of other it's just a way to model real world entity. Questions come why do we need Class in Java, well one thing I can think of is to combine multiple types into one structure. Class and Object along with core OOPS concept e.g. Abstraction, Encapsulation, Inheritance and Polymorphism is the first thing any Java programmer learn. I have just finished a basic Java presentation on Class for beginners which gives an introduction of What is Class in Java and details some important details about Java Classes.

Class in Java - Things to know

Following are some key thing about Class in Java programming language for beginners :

1) Class is represented using class keyword

2) There are two kinds of class, top level and nested class in Java.

3) According to Java convention, the name of the class should start with capital letter.

4) Unlike C structures which are analogous to class, Java classes can contain not only variables but also methods which operate on those fields.

5) The class is the smallest unit of modular code, functionality in Java is presented in terms of class.

6) As per SRP (Single Responsibility Principle)  SOLID design principle, a class should only represent one thing and there should not be more than one reason to change a class. Well designed classes are key for loosely coupled and modular code in Java.

6) Class doesn't do anything special, it's just defined structure and object do all the things.

What is Class and OOPS tutorial programming exampleSee my presentation on What is class in Java for more details

That's all on What is Class in Java programming language, there are a lot more details which we will discuss in the further post.  The best way to learn Class and Object is to model some real world things e.g. Person, Student, Employee etc.

Further Learning
SOLID Principles of Object Oriented Design
Absolute Introduction to Object Oriented Programming in Java
Java - Object Oriented Programming [For Absolute Beginners]

Related Java and OOPS programming Tutorials
What is abstraction in Java programming language
What is Encapsulation in Java with Example
What is a polymorphism in Java? method overloading or overriding
What is Inheritance in Java with Example
Difference between Abstraction and Encapsulation in Java

1 comment:

  1. Nice explanation & specially videos are very beneficial


Feel free to comment, ask questions if you have any doubt.