0% found this document useful (0 votes)
17 views1 page

Java OOP Concepts and Core Notes

The document provides comprehensive notes on Object Oriented Programming (OOP) and Core Java, covering key concepts such as classes, objects, inheritance, polymorphism, encapsulation, and abstraction. It explains various components like constructors, access modifiers, packages, the collections framework, exception handling, and object cloning. Additionally, it discusses advanced topics like lambda expressions, generics, and enums, emphasizing their importance in Java programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

Java OOP Concepts and Core Notes

The document provides comprehensive notes on Object Oriented Programming (OOP) and Core Java, covering key concepts such as classes, objects, inheritance, polymorphism, encapsulation, and abstraction. It explains various components like constructors, access modifiers, packages, the collections framework, exception handling, and object cloning. Additionally, it discusses advanced topics like lambda expressions, generics, and enums, emphasizing their importance in Java programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

JAVA OOP AND CORE JAVA – COMPLETE NOTES (TCS PRIME) 1.

Object Oriented
Programming (OOP) OOP is a programming approach where programs are designed using
real-world objects. Objects contain data (variables) and behavior (methods). Four pillars of OOP:
Inheritance, Polymorphism, Encapsulation, Abstraction 2. Class and Object Class is a blueprint.
Object is an instance of a class. Class does not occupy memory, object occupies memory. 3.
Constructors A constructor initializes an object. It has the same name as the class and no return
type. Types: Default, Parameterized, Constructor Overloading. this keyword refers to current object.
4. Inheritance Inheritance allows a child class to acquire properties of a parent class. Types: Single,
Multilevel, Hierarchical. Java does not support multiple inheritance using classes due to ambiguity.
super keyword is used to access parent class constructor, methods, and variables. 5.
Polymorphism Polymorphism means one method name, multiple behaviors. Types: Compile-time
(Method Overloading) Runtime (Method Overriding) Overriding works using dynamic method
dispatch where JVM decides method at runtime based on object type. 6. Encapsulation
Encapsulation is binding data and methods together and hiding data using private variables and
public methods. Provides security and control. 7. Abstraction Abstraction means showing what to
do and hiding how to do. Achieved using abstract classes and interfaces. 8. Abstract Class An
abstract class cannot be instantiated. It can have abstract and non-abstract methods. Abstract
class can have constructor. Abstract static methods are not allowed. 9. Interface Interface provides
100% abstraction conceptually. Supports multiple inheritance. Methods are public and abstract by
default. Variables are public static final. Static interface methods cannot be overridden. 10. Access
Modifiers private – accessible only within class protected – accessible in same package and
subclasses public – accessible everywhere default – package-level access 11. Packages Package
is a group of related classes. Built-in packages: [Link] (auto imported) [Link] (collections)
[Link] (input/output) [Link] (networking) [Link] (GUI) 12. Object Class Object is the parent of
all classes in Java. Important methods: equals(), hashCode(), toString(), getClass(), clone() equals
compares content, == compares reference. 13. instanceof Operator Used to check object type at
runtime. 14. Collections Framework Used to store and manipulate groups of objects. Core
interfaces: List, Set, Queue, Map. ArrayList – fast, not synchronized Vector – synchronized,
thread-safe but slow 15. Generics Provide type safety and remove casting. Wildcards provide
flexibility (? extends, ? super). 16. Custom ArrayList Custom implementation helps understand
internal working like resizing and indexing. 17. Comparator and Comparable Comparable – natural
ordering Comparator – custom ordering 18. Lambda Expressions Short syntax for functional
interfaces. Introduced in Java 8. 19. Exception Handling Used to handle runtime errors. Keywords:
try, catch, finally, throw, throws Custom exceptions represent business logic errors. 20. Object
Cloning Cloning creates a copy of an object. Shallow Copy – shares references Deep Copy –
creates independent objects 21. Enums Enums represent fixed constants. Enums cannot extend
classes but can implement interfaces. Enum constructors are private by default. END OF NOTES

You might also like