This repository contains Java code examples and exercises related to various object-oriented programming concepts. Below is a brief overview of the main topics covered:
- Student Class: Demonstrates the use of different access modifiers such as private, default, protected, and public. View Code
- Client Class: A client class that tries to access the members of the
Studentclass. View Code - Instructor Class: Another class that interacts with the
Studentclass. View Code - Access Modifiers Check: Contains classes that check the accessibility of members with different access modifiers. View Code
- Demonstrates the concept of constructor chaining across multiple classes (
A,B,C, andD). View Code
- Student Class: A simple class with member variables but without explicit constructors. View Code
- Client Class: Demonstrates the creation of
Studentobjects. View Code
- Student Class: A class with default values for its member variables. View Code
- Client Class: Demonstrates the use of default constructors. View Code
- User Class: A base class with a simple
loginmethod. View Code - Instructor Class: A derived class that extends
Userand introduces additional functionality. View Code - Client Class: Demonstrates the use of inheritance in Java. View Code
- Contains classes
AandBwith protected member variables and their interactions. View Code