Native
Modifier:
This is used as a methods modifier. Its
body is implemented in another programming language such as c (or) c++. Native methods
are platform dependent. The Native modifier informs the java compiler that a methods
implementation is in external c file. It is for this reason that native method declaration
look different from other java methods .they have no body
E.g.: native int findTotal ();
Note: That the method declaration ends with a semicolon. There are no curly braces containing java code .This is implemented in C or C++ code. It makes potential security risk and loss of portability
Transient Modifier
The object has a transient part it is not part of the persistent
state of an object. You can use the transient modifier if you do not want to store
certain data member to file. This is used only with data members.
Class transistent
{
Transistent
Boolean b; //not
to be stored
Int k; //to be stored
}
Volatile Modifier
It may be modified by asynchronous threads. The volatile modifier
is used for volatile that can be simultaneously modified by many threads.
Note:
1. You can
change the order of the access specifier and modifiers
Public static void main(String args[])
Static public void main(String srgs[])
2.
You cannot
use two or more access specifiers in a declaration
Private public int a; //illegal
Synchronized Modifier
This is used in multi
–threaded programming .A thread is a unit of execution within a process. In multi-threaded
you need to synchronize various threads. The synchronized keyword used to tell the
program that the thread is safe. This is allowing a single thread access to a method
at once, forcing the others to wait their turn.
nice
ReplyDeletethanq boss
Deletejianbin1205
ReplyDeletecheap uggs
north face outlet online
coach outlet online
uggs outlet
snapback hats
true religion outlet,true religion jeans,true religion kids,true religion jeans sale,true religion jeans for men,true religion jacket,true religion sale
cheap oakley sunglasses
moncler coats
ugg boots on sale
cyber monday
kobe bryants shoes 2015
polo ralph lauren uk
moncler outlet
lululemon outlet
prada outlet
chanel handbags
ugg uk outlet
toms outlet
canada goose outlet
the north face jackets
new england patriots
chicago blackhawks
michael kors outlet sale
new york giants
air force one shoes
nike air max 90
ugg boots
air jordan 11 free shipping
michael kors handbags
nike trainers uk
air jordan shoes
kansas city chiefs
chicago bulls