Can an outer class access the members of inner class

0 votes
If the inner class is defined as private and protected, can the outer class access the inner class members? and can the inner class access members of the outer class?
May 9, 2022 in Java by Kichu
• 19,040 points
393 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Java

+1 vote
6 answers

How can I separate the digits of an int number in Java?

You can also have a look here: To ...READ MORE

answered Dec 9, 2020 in Java by Roshni
• 10,480 points
209,893 views
0 votes
0 answers

How can I find the prime factors of an integer in JavaScript?

Using a for loop in javascript, I was attempting to determine the prime factors of a number, denoted as 'integer' below.  I can't seem to get it to work, and I'm not sure if it's because of my JavaScript or my calculating logic. //integer is the value for which we ...READ MORE

Dec 12, 2022 in Java by Nicholas
• 7,760 points
1,017 views
0 votes
2 answers

What is the use of toString method in Java and how can I use it ?

Whenever you require to explore the constructor ...READ MORE

answered Aug 23, 2018 in Java by Daisy
• 8,140 points
4,102 views
0 votes
2 answers

How can I invoke a method when the method name is in the form of a given string?

You could probably use method invocation from reflection: Class<?> ...READ MORE

answered Aug 19, 2019 in Java by Sirajul
• 59,230 points
3,067 views
0 votes
2 answers

How can I get the filenames of all files in a folder which may or may not contain duplicates

List<String> results = new ArrayList<String>(); File[] files = ...READ MORE

answered Sep 12, 2018 in Java by Sushmita
• 6,920 points
1,909 views
0 votes
1 answer

In which class is the "length" property of array defined ?

It's defined in the Java language specification: The members ...READ MORE

answered May 8, 2018 in Java by Rishabh
• 3,620 points
1,144 views
0 votes
1 answer

Should a class file always be inside package for importing it in jsp page?

Hey there! It is not necessary for the ...READ MORE

answered May 24, 2019 in Java by Karan
2,203 views
0 votes
1 answer

no 'access-control-allow-origin' header is present on the requested resource

The java <class-name> command syntax is one ...READ MORE

answered Feb 8, 2022 in Java by Soham
• 9,710 points
772 views
0 votes
1 answer

How do i check a ip address range whether it falls in Class A,Class B,Class C

class NetworkId{ static String findClass(String str){ int index = ...READ MORE

answered Feb 16, 2022 in Cyber Security & Ethical Hacking by Edureka
• 13,620 points
891 views
0 votes
1 answer

C++ "Object" class

No, there is no generic base class&nb ...READ MORE

answered Jun 2, 2022 in C++ by Damon
• 4,960 points
497 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP