Java OOPS Concepts - W3schools


Quick Guide to OOPS Concepts W3Schools. Java OOPS Concepts Tutorial.

OOPS Concepts in Java

In this tutorial, We'll explore about oops concepts in java w3schools with examples. If you are new to Java programming, You should know the concepts of Object Oriented Programming(OOP) before you start writing coding. This tutorial let you know Classes, Object, Packages, Encapsulation, Inheritance, Polymorphism, Abstraction.

In Java, Please consider behavior means a method how it works or behave called as "behavior".

W3schools Object Oriented Programming:

One prime characteristic that is constant in the world of software is the change and advancement in software. That change is one of the most critical aspects of software development. Development of new tools and techniques is common for everyday technology users. For software engineers, the most important thing is the maintainability, portability, re-usability, integrity, security, and user-friendliness. So to build today's sophisticated software it is just not enough to put together a sequence of programming statements or procedures. Programmers need to use sound construction techniques and program structures that are easy to figure out implement and modify in a wide variety of situations. It is possible and efficient to use with Object-oriented Programming techniques.

OOPS Concepts in Java

Top Objectives of OOP(Object Oriented Programming):

The emphasis is on the data rather than the procedures.
Methods that operate on data are tied together in a data structure.
Programs are divided into small instance called Objects.
Data remains hidden and cannot be accessed by external functions.
Objects may communicate with each other through methods.
The programs follow the bottom-up approach.
New data and methods can be easily added whenever necessary.

Basic Terms and Concepts that used in OOPS:

  • Classes and Objects
  • Data Abstraction
  • Data encapsulation
  • Inheritance
  • Polymorphism
  • Dynamic Binding

Java has following OOPS features: Encapsulation. Inheritance. Polymorphism. Abstraction. Classes. Objects. Instance. Method.

What is Class :

Class defines blueprint or set of properties of Objects. Class name conventions are first letter should be capital letter and meaningful. If we want to write a class to read content from buffer so we can say name as "bufferedreader" but this should follow naming convention. Each letter in word should be upper case. Eg. "BufferedReader", "FileReader", ..

Class BufferedReader{
int age;

What is Object :

Object is which holds state and behaviour. Once class can have different states and behaviours. For example, Car class can have first object with name "Ford" and second object with "Audi" with different engines.

What is Package :

Package is which describes about class location where it is located in project.

More about Packages are defined in article.

What is Encapsulation:

Encapsulation is which describes about bringing together members and its behavior. Java supports Encapsulation principle but it default does not come with Encapsulation. When we write code, we have to implement it using its principles. Encapsulation provides maintainability, flexibility, and extensibility of the code.

Full article about Encapsulation

What is Inheritance :

Java has powerful mechanism to get the access of state and behaviour of another class and can make well structured and design project.

What is Polymorphism:

Actual dictionary meaning of Polymorphism is one organism can have many forms. The same logic also has been applied to Java. Behaviour can be changed with same method names.

What is Abstraction:

Abstract means ""existing in thought or as an idea but not having a physical or concrete existence". In Java, hiding the behaviour implementation.

Abstract classes example

Main Advantages of OOPS:

  • Code recycle and reuse.
  • Wrapping up of data into a single unit.
  • Easy to partition the work in a project based on objects.
  • Message passing technique between objects for communication makes interface description with external systems much more straightforward.
  • Software Complexity can be easily handled and managed.
  • Possible to map objects in a problem domain within a program.
  • Data hiding is possible.
  • Use of inheritance can eliminate redundant codes in a program


  1. This comment has been removed by the author.


  2. Thanks for taking time to share this post. It is really useful. Continue sharing more like this.
    Android Training in Bangalore

  3. I have read your blog its very attractive and impressive. I like your blog. Java online course Bangalore

Please do not add any spam links in the comments section.

About Us

Author: Venkatesh - I love to learn and share the technical stuff.

accumulo,1,ActiveMQ,2,Adsense,1,API,37,ArrayList,18,Arrays,24,Bean Creation,3,Bean Scopes,1,BiConsumer,1,Blogger Tips,1,Books,1,C Programming,1,Collection,8,Collections,37,Collector,1,Command Line,1,Comparator,1,Compile Errors,1,Configurations,7,Constants,1,Control Statements,8,Conversions,6,Core Java,149,Corona India,1,Create,2,CSS,1,Date,3,Date Time API,38,Dictionary,1,Difference,2,Download,1,Eclipse,3,Efficiently,1,Error,1,Errors,1,Exceptions,8,Fast,1,Files,17,Float,1,Font,1,Form,1,Freshers,1,Function,3,Functional Interface,2,Garbage Collector,1,Generics,4,Git,9,Grant,1,Grep,1,HashMap,2,HomeBrew,2,HTML,2,HttpClient,2,Immutable,1,Installation,1,Interview Questions,6,Iterate,2,Jackson API,3,Java,32,Java 10,1,Java 11,6,Java 12,5,Java 13,2,Java 14,2,Java 8,128,Java 8 Difference,2,Java 8 Stream Conversions,4,java 8 Stream Examples,12,Java 9,1,Java Conversions,14,Java Design Patterns,1,Java Files,1,Java Program,3,Java Programs,114,Java Spark,1,java.lang,4,java.util. function,1,JavaScript,1,jQuery,1,Kotlin,11,Kotlin Conversions,6,Kotlin Programs,10,Lambda,2,lang,29,Leap Year,1,live updates,1,LocalDate,1,Logging,1,Mac OS,3,Math,1,Matrix,6,Maven,1,Method References,1,Mockito,1,MongoDB,3,New Features,1,Operations,1,Optional,6,Oracle,5,Oracle 18C,1,Partition,1,Patterns,1,Programs,1,Property,1,Python,2,Quarkus,1,Read,1,Real Time,1,Recursion,2,Remove,2,Rest API,1,Schedules,1,Serialization,1,Servlet,2,Sort,1,Sorting Techniques,8,Spring,2,Spring Boot,23,Spring Email,1,Spring MVC,1,Streams,31,String,61,String Programs,28,String Revese,1,StringBuilder,1,Swing,1,System,1,Tags,1,Threads,11,Tomcat,1,Tomcat 8,1,Troubleshoot,26,Unix,3,Updates,3,util,5,While Loop,1,
JavaProgramTo.com: Java OOPS Concepts - W3schools
Java OOPS Concepts - W3schools
Quick Guide to OOPS Concepts W3Schools. Java OOPS Concepts Tutorial.
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content