what is difference betwenn Access Specifier and Access
Modifier ????

Answers were Sorted based on User's Feedback



what is difference betwenn Access Specifier and Access Modifier ????..

Answer / praveen111tripathi

Access Specifiers specify the scope of anything(D.M,Member
function ,class)while Access modifiers define that thing's
accessibility in different scops
A.S. in java
1-Public
2-default
3-protected
4-private
A.M. in java
static,final etc.

Is This Answer Correct ?    19 Yes 1 No

what is difference betwenn Access Specifier and Access Modifier ????..

Answer / sudhir dhumal

Access specifiers specify the access level.

There are four access specifiers:
public, private, protected and default

Access modifiers are the keywords used to modify the statement and specify the access level.

There are three access modifiers:
public, private and protected
*Here we don't write default which means we are not modifying the statement so its not a access modifier it just specify the access level

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)

0 Answers   Amazon,


How do you use nextline in java?

0 Answers  


Java run-time system generates What class of exceptions?

2 Answers   TCS,


explain what is transient variable in java?

0 Answers  


Can we declare a static variable inside a method?

0 Answers  






How to make a method thread safe without using synchronized keyword?

8 Answers   Persistent, Societe Generale,


What is lambda programming?

0 Answers  


Why do we need singleton?

0 Answers  


If your team member writes code with lots of static variables and static methods, will it cause any side effects?

3 Answers   KPIT,


Differentiate between array list and vector in java.

0 Answers  


What is difference between path and classpath?

0 Answers  


What is the purpose of checked and unchecked exceptions in JAVA?

0 Answers   Amdocs,


Categories