Adobe Interview Question for Applications Developers


Country: India




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

i think it will be a compilation error...
bacause final means you can not change the value of variable..and volatile means value of variable can also be changed from outside sources (apart from immediate code)...

- CrazyCoder April 29, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Compilation Error : A field can be a final or volatile. Can't be both.

- gambitshaan April 29, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

The field will evaporate on initialization.

- Anonymous April 30, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Compilation error because:
- with volatile you tell the compiler that you'll eventually assign value to the variable (which will cause cache flushes, reordering should not happen etc. - and it is important for compiler/runtime to know about it) .
- with final you tell the compiler that the field will never be modified after it is explicitly initialized

- a May 01, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Compiler error

- stones333 May 01, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Compiler error

- stones333 May 01, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

transient != volatile

- sg July 25, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

i declared like this : transient final int count=0;

its working perfectly.no compilation error

- maddy May 14, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Final says it will not be modified and volatile says don't optimize this value it might be changed from external events, so it will give no error . both are compile time flags

- Ashish July 09, 2012 | Flag Reply


Add a Comment
Name:

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

Books

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

Videos

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