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

Access Modifiers

JALA Academy provides 100% job guarantee programs for individuals looking to build a career in IT, regardless of their experience level. The document outlines exercises related to access modifiers in programming, including creating classes with private, default, protected, and public fields and methods. Additionally, JALA Academy offers opportunities in various IT fields such as Full Stack, MERN Stack, and Cyber Security, with internships available.

Uploaded by

Amit Tiwari
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)
9 views1 page

Access Modifiers

JALA Academy provides 100% job guarantee programs for individuals looking to build a career in IT, regardless of their experience level. The document outlines exercises related to access modifiers in programming, including creating classes with private, default, protected, and public fields and methods. Additionally, JALA Academy offers opportunities in various IT fields such as Full Stack, MERN Stack, and Cyber Security, with internships available.

Uploaded by

Amit Tiwari
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
You are on page 1/ 1

JALA Academy is the world’s first Academy offering 100% Job guarantee Programs

without Trainers from 0 to 20 years’ experience.


Anyone who wants to build solid career in IT can enroll.
Read JALA Academy website and contact us for any career advice and questions.

8. Access Modifiers

1. Create a class with PRIVATE fields, private method and a main method. Print the fields
in main method. Call the private method in main method.

Create a sub class and try to access the private fields and methods from sub class.

2. Create a class with DEFAULT fields and methods. Access these fields and methods
from any other class in the same package

3. Create a class with PROTECTED fields and methods. Access these fields and methods
from any other class in the same package.

Also, Access the PROTECTED fields and methods from child class located in a different
package

Access the PROTECTED fields and methods from any class in different package

4. Create a class with PUBLIC fields and methods.

Access the public methods and fields from any class in the same package or different
package.

_____________________________________________________________________________________
JALA Academy offers Job Guarantee Programs, Income Earning Opportunities, and Internship with
stipend on Full Stack, MERN Stack, QA, Test Automation, RPA, Cloud Technologies, DevOps and Cyber
Security. Read our website JALA Academy for more details.

You might also like