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 481 of 502    Print  
Access Specifier
What will happen if same access specifier repeats more than once within a class?


  
Total Answers and Comments: 6 Last Update: August 17, 2009     Asked by: naggeek 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: interviewprep9
 
Can you please make the question clear?

Above answer was rated as good by the following members:
vsimha4, 12srinu12, alok2009, sandeep549, sujithkthomas
June 11, 2008 02:57:44   #1  
Santosh N Member Since: June 2008   Contribution: 3    

RE: Access Specifier
Within the same class when there are more than one access specifier the latest access specifier i.e. the access specifier specified in the end would be considered as final
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
June 11, 2008 03:01:54   #2  
Santosh N Member Since: June 2008   Contribution: 3    

RE: Access Specifier
WE can access java values in javascript by creating an object of the java class and then using the getters and setters.However the java class file needs to be imported if we have to create and object of the java class file and use getters and setters on this.
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 2Overall Rating: -2    
June 11, 2008 04:02:20   #3  
kiranmai.kasturi Member Since: June 2008   Contribution: 4    

RE: Access Specifier

Means where while creating class like " public private class <class-name>{...}" or declaring properties..question is not clear. If it is while declaring class it wont accept mutiple access specifiels as it accept public abstract or final give compiler error


 
Is this answer useful? Yes | NoAnswer is useful 3   Answer is not useful 0Overall Rating: +3    
June 14, 2008 13:48:23   #4  
interviewprep9 Member Since: June 2008   Contribution: 10    

RE: Access Specifier
Can you please make the question clear?
 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 3Overall Rating: -1    
November 07, 2008 08:44:36   #5  
12srinu12 Member Since: November 2008   Contribution: 1    

RE: Access Specifier
If the same access specifiers are used for the methods in the same class nothing will happen. Problem occurs only when all the classes in the program are assigned with same access specifiers.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
August 17, 2009 10:31:08   #6  
Sarje Member Since: August 2009   Contribution: 62    

RE: Access Specifier
Multiple Acceess Specifier cannot be used with a class because it makes no sense and if you do so compile time error(wrong combination of modifiers) will be generated.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 
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