Interview Questions and Answers :: Cisco
Home > Experience Archives > Cisco > Interview Question Set 9 > Discussion
2. What is static and volatile variable, and its use.
Answer:
The Java volatile keyword guarantees visibility of changes to variables across threads.
The java static keyword, If we declare any variable or method as a static then there is no need to create object of it. It is directly accessible from class reference.
ABHAY KUMAR
30 Nov, 2017 10:12 PM
The Java volatile keyword guarantees visibility of changes to variables across threads.
The java static keyword, If we declare any variable or method as a static then there is no need to create object of it. It is directly accessible from class reference.
The java static keyword, If we declare any variable or method as a static then there is no need to create object of it. It is directly accessible from class reference.
Report Error
Report Error
Please Login First Click Here