Skip to content

Commit 76e00e3

Browse files
committed
notes: added JavaQ67
1 parent 4403f5a commit 76e00e3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

notes/questions.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,11 @@ int Integer
761761
>
762762
> If one thread is writing or updating long value, it's possible for another thread to see half value (fist 32-bit). While reading/writing a volatile long or double (64 bit) is atomic.
763763
764+
67. Which one would be easy to write? synchronization code for 10 threads or 2 threads?
765+
> In terms of writing code, both will be of same complexity because synchronization code is independent of a number of threads.
766+
> Choice of synchronization though depends upon a number of threads because the number of thread present more contention,
767+
> so you go for advanced synchronization technique e.g. lock stripping, which requires more complex code and expertise.
768+
764769
## Spring Boot
765770
1. What is the difference between Java EE and Spring?
766771
> Java EE is standardized (now Jakarta EE), runs on containers like WildFly.<br>

0 commit comments

Comments
 (0)