Answer Posted / chandra rekha
Access modifiers is different from Access specifiers. The
access specifiers tells whether member data\methods\classes
of a class can be accesible or not by other
classes\subclasses\packages whereas the modifiers tells how
the memberdata\methods\classes can be used by other classes.
The access specifiers available in java are
Public,private,protected,default(friend or package).
The modifiers available are
static:can be applied to member data,methods,inner
classes.used to define class variables and methods that
belong to the a class but not to any particular instance of
class.all the variables share the same static method.
final:(variables,methods,classes) final modifier indicates
that the variable\method\class cannot be modified in any
other classes\subclasses\packages.
abstract:(classes) used to declare classes having same
properties and methods.abstract classes are used to derive
classes of the same type.
native:(methods) indicates that the code is out of java
runtime environment,written in some other programming
language other than java.
synchronized:(methods) used to control access to a
particular method in a multithreaded java program.
Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
Can we override the static methods?
What is application tier?
What is the vector class in java programming?
Differentiate between vector and array list.
What is bool mean?
What is getclass () getname () in java?
Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?
What is the driver class?
why would you use a synchronized block vs. Synchronized method? : Java thread
How thread scheduler schedule the task?
Why are arrays useful in java?
How to display all the prime numbers between 1 and 100
What is default locale java?
What is the default access specifier for variables and methods of a class?
4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (