Java Programming - Declarations and Access Control - Discussion
Discussion Forum : Declarations and Access Control - General Questions (Q.No. 15)
15.
Which of the following class level (nonlocal) variable declarations will not compile?
Answer: Option
Explanation:
Option C will not compile; the synchronized modifier applies only to methods.
Option A and B will compile because protected and transient are legal variable modifiers. Option D will compile because volatile is a proper variable modifier.
Discussion:
2 comments Page 1 of 1.
Guruputra said:
1 decade ago
How the transient can became access-specifier?
(1)
TINTU said:
1 decade ago
Synchronized modifier not only applied for method. It also applied for blocks.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers