Answer Posted / glibwaresoftsolutions
It is not possible to create a volatile with Java. Only individual variables in Java can use volatile keywords; arrays and collections cannot. When a variable is specified as volatile, its value is never cached in a thread's local memory; instead, it is always read from and written to the main memory. This makes it simpler to ensure that any changes made to the variable are visible to all threads that access it.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Differentiate between class and structure.
What is the difference between object oriented programming language and object based programming language?
What are the three parts of a lambda expression?
How do you override a private method in java?
How we can skip finally block of exception even if some exception occurs in the exception block in java?
Does java have extension methods?
How you can force the garbage collection?
Can we override constructors?
Can a class be a super class and a sub-class at the same time? Give example.
Can arraylist contain null values?
How do you check if a string is lexicographically in java?
What are the differences between path and classpath variables?
Is finalize() similar to a destructor?
What is the primitive type short?
What is printwriter in java?