UrbanPro

Learn IT Courses from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is volatile variable in java. When it can be useful.

Asked by Last Modified  

Follow 0
Answer

Please enter your answer

Trainer

volatile is used to indicate that a variable's value will be modified by different threads. Value will not be stores in thread cache. All the operations will work with the main copy. Its acts as it is in a synchronized block.
Comments

Tutor

http://java.dzone.com/articles/java-volatile-keyword-0
Comments

Tutor

http://java67.blogspot.in/2012/08/what-is-volatile-variable-in-java-when.html
Comments

Tutor

volatile variable in Java is a special variable which is used to signal threads, compiler that this particular variables values is going to be updated by multiple thread inside Java application. By making a variable volatile using volatile keyword in Java, application programmer ensures that its value...
read more
volatile variable in Java is a special variable which is used to signal threads, compiler that this particular variables values is going to be updated by multiple thread inside Java application. By making a variable volatile using volatile keyword in Java, application programmer ensures that its value should always been read from main memory and thread should not used cached value of that variable from there own stack. When to use Volatile variable in Java This is the most important thing to learn while learning about volatile variable in Java. When to use volatile variable in Java is also a famous multi-threading interview question in Java. here are some of the scenario where you can use volatile variable in Java : 1) Any variable which is shared between multiple threads should be made variable, in order to ensure that all thread must see latest value of volatile variable. 2) A signal to compiler and JIT to ensure that compiler does not change ordering or volatile variable and moves them out of synchronized context. 3) You want to save cost of synchronization as volatile variables are less expensive than synchronization. read less
Comments

View 2 more Answers

Related Questions

when the ethical hacking training will start you will inform me?
We are starting a batch on October 15th 2016. Its a 4 day course (october 15th,16th,22nd and 23rd). For more details call us infySEC Solution Pvt. Ltd.
Shukhamoy
0 0
8
How to study cyber security?
Hello, You need to have basic knowledge of Windows, Linux, Networking. After which you can go for Ethical Hacking & Security Courses
Thamban

Why is HTML is used in Web Application?

The role of HTML in web development is to provide the backbone and structure of a web page. It defines the layout and organization of content on a web page by using a ranked structure of elements. HTML...
Karthick Ramesh Kumar
0 0
5
Hi, I am working as a web designer and want to work as UI developer. So what should I have to learn initially? And learning Angular Js would be a good option?
It is good choice web designer to become web developer (UI developer). Start with the basics first learn HTML and CSS, Then go and continue with bootstrap and Angular js.
Mudita

which is best course after done MBA F&M and SAP MM Counsult level course ?  please suggest Non -SAP Course ? 

SAP is a good choice, get certified as functional consultant for the Finance module of SAP
Priya

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

MS Project: Manual and Auto schedule tasks
Tasks can be scheduled in MS Project in two ways - manual scheduling and automatic scheduling. Manual scheduling gives the users control over how tasks are scheduled and on the other hand auto schedule...

Requirements Traceability Matrix
To keep a trace of the requirements captured till they are implemented Traceability helps in the following : Keeping track of requirements as they move through various project phases Identifying...

SQL Union Vs Union ALL
SQL UNION vs UNION ALL Operator Usage UNION: UNION combines the result set of two or more queries into a single result set. UNION removes duplicate records (where all columns in the results are the same). UNION...

Data Integrity in SQL Server
It is often told, data without integrity is just numbers. There are different situations like1. When a user enters data which is not in proper range or invalid2. A wrong DML operation is attempted by...

Black in Python
When you are upturn in your career from beginner to experienced in programming world, your team will start looking at ‘how you are writing?’ Here the responsibility piling up. Okay,...

Recommended Articles

Applications engineering is a hot trend in the current IT market.  An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...

Read full article >

Microsoft Excel is an electronic spreadsheet tool which is commonly used for financial and statistical data processing. It has been developed by Microsoft and forms a major component of the widely used Microsoft Office. From individual users to the top IT companies, Excel is used worldwide. Excel is one of the most important...

Read full article >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Business Process outsourcing (BPO) services can be considered as a kind of outsourcing which involves subletting of specific functions associated with any business to a third party service provider. BPO is usually administered as a cost-saving procedure for functions which an organization needs but does not rely upon to...

Read full article >

Looking for IT Courses ?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for IT Courses Classes?

The best tutors for IT Courses Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn IT Courses with the Best Tutors

The best Tutors for IT Courses Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more