Solved

Java Programming Question for coding

Posted on 2011-09-25
4
203 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
  • 2
  • 2
4 Comments
 
LVL 82

Expert Comment

by:leakim971
Comment Utility
only the THREE public methods
0
 

Author Comment

by:bakerule22
Comment Utility
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 50 total points
Comment Utility
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
Comment Utility
ok thanks
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now