ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
How to access a method that it declared as protected?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How to access a method that it declared as protected?
Answer
# 1
If a method is marked protected, only the subclass of that
class can access it. To make it accessible to other classes,
the subclass of that class can override the protected method
and the override can be marked as public making it
accessible to other classes.
 
Is This Answer Correct ?    1 Yes 0 No
Ranganathkini
 
  Re: How to access a method that it declared as protected?
Answer
# 2
only thru inheritance
 
Is This Answer Correct ?    0 Yes 0 No
Bulbull
 
 
 
  Re: How to access a method that it declared as protected?
Answer
# 3
a protected method can be accessed with in the same packege
and subclasses outside of the package
 
Is This Answer Correct ?    0 Yes 1 No
Ravikiran(aptech Mumbai)
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
what is the Use of throws exception?  2
How OOPS concept is achieved in Java? JPMorgan-Chase4
adapter class ?  2
what is difference between throw and throws in exception?  16
suppose in a class there is a code like this: { Set hs=new Hashset(); hs.add(new Emp("kathy",1000)); hs.add(new Emp("kathy",2000)); } how can u avoid the above code in your class as set won't allow duplicate objects?  2
how many ways to create Thread and which one is good? runnable interface ot Thread class? Satyam3
how many types of cloning? Mobily1
How does serialization work Ordain-Solutions2
Differentiate constructor and a method and how are it be used? Wipro5
Diff between C++ and java? TCS8
what is jdk1.5 features? Virtusa2
what is the difference between abstract class and Interface?where we can use it in realtime projects? Logica-CMG10
what is mean by method signature? Satyam6
Name the method of a Container that can be used to cause a container to be laid out and redisplayed?  1
What is run time polymorphism? Elementus-Technologies6
What is the difference between static and non-static variables?  2
What is persistence ?  2
How many statements can be created with one connection in jdbc? Polaris2
If all the methods in abstract class are declared as abstract then what is difference between abstract class and in interface? Synechron6
What is a Wrapper class?  9
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com