Skip to content

Commit ff60a45

Browse files
authored
Update README.md
1 parent 7735616 commit ff60a45

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,4 +946,38 @@ Generally the ArrayList is quicker than the HashTable to insert elements in some
946946

947947
---
948948

949+
### 61. You're trying to store people's info in a hash table. How would you design your key?
950+
951+
Will create a hashtable in which I will insert an integer id as key and Map<People> as value.
952+
953+
**[Back to Top](https://github.com/aatul/Java-Interview-Questions-Answers/blob/master/README.md#java-interview-questions-answers)**
954+
955+
---
956+
957+
### 62. What is the synchronized keyword and what are the different ways to use synchronized keywords?
958+
959+
A piece of logic marked with synchronized becomes a synchronized block, allowing only one thread to execute at any given time.
960+
961+
**[Back to Top](https://github.com/aatul/Java-Interview-Questions-Answers/blob/master/README.md#java-interview-questions-answers)**
962+
963+
---
964+
965+
### 63. What is a synchronized block? What is the difference between synchronized block and synchronized method?
966+
967+
A piece of logic marked with synchronized becomes a synchronized block, allowing only one thread to execute at any given time.
968+
969+
Synchronized method provides a lock corresponding to class level or object level, whereas Synchronized block provides a lock on any object depending on the parameter.
970+
971+
**[Back to Top](https://github.com/aatul/Java-Interview-Questions-Answers/blob/master/README.md#java-interview-questions-answers)**
972+
973+
---
974+
975+
### 64. Explain concurrent accumulators? And Concurrency in java?
976+
977+
Concurrent accumulator classes that enable you to very efficiently increase / decrease the value of a counter in a thread safe manner. This is really a case where it’s not a question of taste, or preference – using these new classes in your code is really a no-brainer.
978+
979+
**[Back to Top](https://github.com/aatul/Java-Interview-Questions-Answers/blob/master/README.md#java-interview-questions-answers)**
980+
981+
---
982+
949983
Wish you all the luck.

0 commit comments

Comments
 (0)