Solved

Java Programming Question for coding

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
runtime exception 2 41
Glassfish admin console not working 1 32
Html Table Looping (part 2) 5 27
What browser will run Java? 7 41
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

791 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