à®®ேலுà®®் பல புதிய டெக்னாலஜி பற்à®±ி தெà®°ிந்து கொள்ள, எங்கள் "டெக் டுப் தமிà®´் நாடு" யூட் டூஃப் சேனலை SUBSCRIBE செய்து கொள்ளவுà®®்.

Breaking

Sunday 8 October 2017

OOPS in JAVA 10


OOPS in JAVA 10

Modifiers in Java

Modifiers are keywords that are added to change meaning of a definition. In Java, modifiers are catagorized into two types,

  1. Access control modifier

  2. Non Access Modifier


1. Access control modifier

Java language has four access modifier to control access levels for classes, variable methods and constructor.

Default : Default has scope only inside the same package

Public : Public scope is visible everywhere

Protected : Protected has scope within the package and all sub classes

Private : Private has scope only within the class

 

1. Non-access Modifier

Non-access modifiers do not change the accessibility of variables and methods, but they do provide them special properties.

Final : Final modifier is used to declare a field as final i.e. it prevents its content from being modified. Final field must be initialized when it is declared.

Static : For creating class variables and class methods which can be accessed without instance of a class(object).

Abstract : For a class, it cannot be directly instantiated, but has to be subclassed. A method does not have an implementation in the class, but has to be implemented in a subclass.

Transient : When an instance variable is declared as transient, then its value doesn't persist when an object is serialized.

Synchronized : When a method is synchronized it can be accessed by only one thread at a time.

Volatile : Volatile modifier tells the compiler that the volatile variable can be changed unexpectedly by other parts of your program. Volatile variables are used in case of multithreading program.


No comments:

Post a Comment

Hai , Post your comment . (required, Bugs, Errors )

You need to see


SUBSCRIBE NOW



Backlinks : Website Design Company in Coimbatore
Website Design Company in Tamil nadu
Website Design Company in Karur
Website Design Company in Erode
Website Design Company in ooty
Website Design Company in theni
Website Design Company in thoothukudi
Website Design Company in Chennai
Website Design Company in Sathy
Website Design Company in Coimbatore Tamilnadu
Cheap Website Design Company in Coimbatore
Adsense Website Design Company in Coimbatore
ecommerce Website Design Company in Coimbatore
school Website Design Company in Coimbatore
Academy Website Design Company in Coimbatore
Test Website Design Company in Coimbatore
Best Website Design Company in Coimbatore
Adsense Website Design Company in Coimbatore
Adsense Website Design Company in Tamil nadu
Adsense Website Design Company in Karur
Adsense Website Design Company in Erode
Adsense Website Design Company in ooty
Adsense Website Design Company in theni
Adsense Website Design Company in thoothukudi
Adsense Website Design Company in Chennai
Adsense Website Design Company in Sathy
Free SEO Tools online
Free SEO Tools online Website
Free SEO Tools online Plagiarism
Free SEO Tools online article rewriter tool
Free SEO Tools online article reading and writing criticism
Free SEO Tools online seo backlink
Free SEO Tools online Free backlink maker
Free SEO Tools online seo backlink strategy
Free SEO Tools online content writting
360 help SEO Tools online Plagiarism checker
360 help SEO Tools online seo backlink
360 help SEO Tools online Free backlink maker
360 help SEO Tools online content writting
360 help SEO Tools online article rewriter tool
360 help SEO Tools
360 help SEO Tools India
360 help SEO Tools Tamil
360 help SEO Tools website