What does volatile mean? - Cracking the Java Coding Interview

preview_player
Показать описание
Cracking the #Java #Coding #Interview - Question 168: What does volatile mean?
Рекомендации по теме
Комментарии
Автор

Hey, nice explaination it was short and easy to understand.
I have a question: could you explain easily the usage of the "transient" keyword ? I read it was for the old days of serialisation.

Love the java team

(Also I like your talks and the one with Rémi because it's also entertaining and you both have an experience in teaching).

toinouH
Автор

What is the difference between volatile and synchronized?

rmcf
Автор

In China, if you respond this way, the interviewer will think this is not the answer they want. They want more details on Memory Visibility, CPU lock command, prohibition of instruction reordering, and the Happen-Before mechanism. Even they didn't know what these meant.

LOL

linyoung
Автор

Question #169:
Did Brian Goetz eat Valhalla?

forKotlinsky
Автор

Du coups, on a envie de l'utiliser tout le temps. C'est un peu ce que l'on veut tout le temps. Pourquoi ne voudrait-on ne pas avoir la dernière valeur écrite ?

llgmusic
Автор

volatile doesn't prevent race conditions.

redorange
Автор

There is no "Last" value in happens before contracts. This interpretation is oversimplified! Read carefully about synchronization order.

vasiliigulevich
Автор

Now translate, because I didn't understand anything, hahaha

reidecarvalho
Автор

#1 Java tip: don't write code in freaking Java

mattnoxon