?
Solved

Java Programming Question for coding

Posted on 2011-09-25
4
Medium Priority
?
242 Views
Last Modified: 2012-08-13
If class B extends class A, and in class A, there are three public methods and two private methods, how many methods in class A that you will be able to access from class B?
0
Comment
Question by:bakerule22
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 36595958
only the THREE public methods
0
 

Author Comment

by:bakerule22
ID: 36595965
ok thanks but I not sure why there are only three public methods that the class A that you will be able to access from class B
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 200 total points
ID: 36595975
private method are not visible, public is visible (else why to extend?)
 
http://www.codestyle.org/java/faq-Inheritance.shtml#privatefinal
0
 

Author Comment

by:bakerule22
ID: 36595988
ok thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question