Pega Interview Question for Applications Developers

Country: India
Interview Type: In-Person

Comment hidden because of low score. Click to expand.
of 1 vote

The volatile keyword is a type qualifier used to declare that an object can be modified in the program by something such as the operating system, the hardware, or a concurrently executing thread.

This means every time the variable is requested inside the program, each time the value is read from the source memory location(harddrive,devices.etc). normal variables are stored in virtual memory of the processor. They are synced with source memory location only twice. Once during first read and second termination write.
This is useful when the varialbe is used as a control condition in multthreaded or RT applications applications.

- SantiagoYemmiganur June 20, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
of 0 votes

Best example for theses stuff is the Embedded System. you might have a variable called temperature...but at the moment you try to read it, it might been modified by an external system. Making volatile means that this varaible needs to be re-read everytime.

- Pavan Dittakavi March 13, 2013 | Flag
Comment hidden because of low score. Click to expand.
of 0 vote

variables value is most opften changed by threads therefore no optimization is done such a var is called volatile var

- don June 22, 2012 | Flag Reply

Add a Comment

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.


is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More


CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More