Answer the question
In order to leave comments, you need to log in
assert and synchronized in java?
Please explain these two constructions, googling somehow did not really explain.
Assert is not clear at all. And synchronized, as I understand it, blocks some block in such a way that only one thread can access it and this block cannot be executed in parallel. If I understand correctly, what are these cases when this is needed, if possible, also with a code example.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question