Home Java Master-java Fields in java class
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Fields in java class

Advertisement
This page discusses - Fields in java class

Fields in java class

     

In this section, we will explore the concept of the fields in the reference of object oriented programming techniques.

There are two part of the field first is type of field and other one is the name part. We can also define the visibility of that field. There are four type of visibility of that:

Public: The field can be access in the entire class.

Protected: The field define in this section will access by the class, subclass or classes in the same package.

Private: This type of field can be access by the same elements of the class.

Package: The field can be access by any class objects from classes inside the same package in which the field is defined.

We can also define the modification style of the field. There are also four type of modification style.

Static: This type of modifiers are define to the class not to the object.

Transient: This type of field is use to store for the constant value.

Final: The field can not be changed from its assigned value.

Volatile: This type of field can be customized as you might expect at the same time of running threads.

Advertisements

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: April 17, 2011

Ask Questions?    Discuss: Fields in java class  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
Parikh Viranchi
August 23, 2012
worst

pls try to improve your website pls what we want is never answered here i just advice you to give ans according to the question pls i hope when ever by mistake also i opened your website i shall see something better than this.... that is a hope:(
DMCA.com