Access Specifier

What will happen if same access specifier repeats more than once within a class?

Questions by naggeek

Showing Answers 1 - 18 of 18 Answers

Santosh N

  • Jun 11th, 2008
 

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

Santosh N

  • Jun 11th, 2008
 

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.

  Was this answer useful?  Yes

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

12srinu12

  • Nov 7th, 2008
 

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.

Sarje

  • Aug 17th, 2009
 

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.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions