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                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
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 many access specifiers are available in java
 Question Submitted By :: Kiranksj
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how many access specifiers are available in java
Answer
# 1
4
 
Is This Answer Correct ?    6 Yes 0 No
Hani
 
  Re: how many access specifiers are available in java
Answer
# 2
There are four access specifiers are available in java

Public-----------access to all

Private---------limited to class only

Protected---------limited to sub package of class

Default------------limited to same package
 
Is This Answer Correct ?    12 Yes 1 No
Anjani Kumar Jha
 
 
 
  Re: how many access specifiers are available in java
Answer
# 3
there are four access specifier in java.they are

public - means the the properties of  class is accessable 
to all other classes.
private- means the the properties of  class cannot 
accessable to any other classes.
protected- means the properties of class will acessed only 
to its subclasses,not subclasses of  its subclasses.
no access - mean you can access it with in the class.
 
Is This Answer Correct ?    1 Yes 0 No
Gyana
 
  Re: how many access specifiers are available in java
Answer
# 4
There are 4 access specifiers available , they are 
(1) Public
(2) Protected
(3) Default
(4) Private

and their scopes are 

Access|Scope|
Speci |     |CLASS | SUBCLASS | PACKAGE |GLOBAL
--------------------------------------------------------------
  PUBLIC      YES       YES      YES       YES

  PROTECTED   YES       YES      YES       NO  

  DEFAULT     YES       YES      NO        NO    
  
  PRIVATE     YES        NO       NO       NO
 
Is This Answer Correct ?    1 Yes 0 No
Manikandan
 
  Re: how many access specifiers are available in java
Answer
# 5
there are 4 access specifier in java
1: private 
2: default
3: protected
4: public
 
Is This Answer Correct ?    0 Yes 0 No
Ashish Shinkar
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Difference String and String Buffer  3
how to use this key word in java programming?  5
what is difference between type 4 driver and type 1 driver? CMC2
static inner classes means..?  1
what is the use of custom tags? with example? Photon1
Default layout of Dialog object?  1
What is Collections API?  1
watz the difference between abstract class and interface? Which one u ill choose as a designer? Sonata1
What is the difference between throw and throws? Cap-Gemini2
What is the minimum and maximum length of an identifier? TCS6
What do you mean by the term transient? Ericsson4
What is static variable and static method? TCS8
What is the method used to get the absolute value of a number?  2
Can you have a constructor in abstract class?  7
To what value is a variable of the Boolean type automatically initialized?  3
What is the difference between pageContext and page implicit objects in jsp? Merrill-Lynch6
When garbage collector invokes object?s finalize() method?  3
Which One is optimal to choose ? Syncronized hash map or Hash table with single thread model? How can a hash map syncronized with out using syncrozed blocks in programm? Four-soft3
What is Generic in java? Where can we write Generic ( class or method or objects or etc...)? with simple example? Thanks, Bose. Infosys1
What is the default modifier in Interface?  4
 
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