GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java
Go To First  |  Previous Question  |  Next Question 
 Core Java  |  Question 76 of 502    Print  
Whether private,protected method can be overloaded,overrided or not?Tell me reason?

  
Total Answers and Comments: 2 Last Update: August 12, 2009     Asked by: chandu 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 28, 2005 04:52:18   #1  
Devidas Sonawane        

RE: Whether private,protected method can be overloaded...

We can use access specifier's and we can overload the methods also. but we can't override methods( by changing only access specifier is just like a override.)


 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
August 12, 2009 06:03:59   #2  
Sarje Member Since: August 2009   Contribution: 62    

RE: Whether private,protected method can be overloaded,overrided or not?Tell me reason?
Private protected methods can be overloaded and overrided. But while overrding method following rules must be satisfied
We can not narrow the accessibility but can be widen. Means if the access specifier is suppose protected then you can keep it protected or make it public but cannot make it private.

 
Is this answer useful? Yes | No

 Related Questions

Will there be a performance penalty if you make a method synchronized? If so, can you make any design changes to improve the performance

Latest Answer : yes a method can be static and synchronized ...

When you have an object passed to a method and when the object is reassigned to a different one, then is the original reference lost

Can we declare multiple main() methods in multiple classes.ie can we have each main method in its class in our program?

It is a saying that static methods in JAVA programs should be minimised. What is the reason for this? any problems arise or there is any performance measures to be looked into it.
Read Answers (3) | Asked by : Beena

Latest Answer : if we declare const as pvt thn can use in other class ...
Read Answers (4) | Asked by : Beena

Latest Answer : No a Class, Method cannot be Garbage collected simply because a class or Method does not have physical exestence in memory and garbage collector is only used for freeing up the memory which only applies to objects not classes or methods.So only objects ...
Read Answers (5) | Asked by : chandu

Latest Answer : Private protected methods can be overloaded and overrided. But while overrding method following rules must be satisfied We can not narrow the accessibility but can be widen. Means if the access specifier is suppose protected then you can keep it protected ...
Read Answers (2) | Asked by : chandu

I need some more information about interface. For Example there is no any functionality inside the method which is declared in any interface. Then why i want to implement that interface to my class. 2. Statement is an interface. When i say stmt.executeQuery(). I am getting the records in my ResultSet. How it is possible?.. since there is no functionality insid the methods which is declared in Statement Interface. What is happning here?
An idea 

What is the difference between putting a class as abstract or if any of method in class is declared as abstract diference of these two while extending these two types of classes
Read Answers (1) | Asked by : karunakar
Tags : Abstract


 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 

What is Common Data Modeling Method

Common Data Modeling is one of the core considerations when setting up a business data warehouse. Any serious company wanting to have a data warehouse will have to be first serious about data models. Building a data model takes time and it is not unusual for companies to spend two to five years just
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

JavaScript Window Object Open Method Part 2

JavaScript Window Object Open Method Part 2 In this JavaScript tutorial you will learn about JavaScript Window Object Open Method features of window object open method scrollbars status titlebar toolbar top width innerHeight innerWidth outerHeight outerWidth and hotkeys mosgoogle center scrollbars S
 

JavaScript Window Object Open Method

JavaScript Window Object Open Method In this JavaScript tutorial you will learn about JavaScript Window Object Open Method features of window object open method channelmode directories dependent fullscreen screenX screenY height left location menubar resizable alwaysLowered alwaysRaised mosgoogle ce
 

Using UML with Java

Using UML with Java While Java is not a new language its application for the development of embedded systems is quite new Developers are beginning to take a second look at modeling languages such as UML and many feel it can be a powerful tool in their development arsenal mosgoogle center Introductio
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

Java Technology Trends

Technology Trends Involving Java Java is an object oriented programming language OOP for Web browsers It is organized around data rather than actions and supports polymorphism which allows the same code to be written generically so it can function with different datatypes inheritance which allows on
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape