EduLearn - Online Education Platform

Welcome to EduLearn!

Start learning today with our wide range of courses taught by industry experts. Gain new skills, advance your career, or explore new interests.

Browse Courses

OOPs:

 

Encapsulation–>Protects our data from outside access(Atm)

 

Inheritance–>Through inheritance,code can be used in multiple places

 

Polymorphism–>helps in designing flexible and scalable applications

 

Abstraction–>hiding complex details and showing only the necessary parts

 

class Father//Base class

{

void house()

{

System.out.println(“Have own 2bhk house”);

}

}

class Son extends Father// Derived class

{

void car()

{

System.out.println(“Have own audi car..”);

}

}

class Single

{

public static void main(String args[])

{

  • Son o=new S
  • n();

o.car();

o.house();

}

}

Java OOPS concept Encapsulation, Inheritance

Leave a Reply

Your email address will not be published. Required fields are marked *

EduLearn - Online Education Platform

Welcome to EduLearn!

Start learning today with our wide range of courses taught by industry experts. Gain new skills, advance your career, or explore new interests.

Browse Courses

Popular Courses

[Course Image]

Introduction to Programming

Learn the fundamentals of programming with Python in this beginner-friendly course.

12 Hours Beginner
[Course Image]

Data Science Essentials

Master the basics of data analysis, visualization, and machine learning.

20 Hours Intermediate
[Course Image]

Web Development Bootcamp

Build modern websites with HTML, CSS, JavaScript and popular frameworks.

30 Hours Beginner
[Course Image]

Digital Marketing Fundamentals

Learn SEO, social media marketing, email campaigns and analytics.

15 Hours Beginner
Educational Website Footer