Solved

Java Programming Question for coding

Posted on 2011-09-25
4
214 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
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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Protect jar file - windows app 2 39
starter POM and spring-boot-starter,  spring-boot-web 2 43
eclipse shortcuts 9 45
split string containing \r\n in Java 46 38
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…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
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…

862 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

25 Experts available now in Live!

Get 1:1 Help Now