Skip to content

Commit f6d1bfe

Browse files
committed
stringbuilder vs stringbuffer
1 parent a56a3a8 commit f6d1bfe

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ At the beginning, it was the repository with questions from Java interviews. Cur
6565
- [orElse() vs orElseGet() in Optional?](core.md#orelse-vs-orelseget-in-optional)
6666
- [How to filter list of objects using Stream API without .filter()?](core.md#howto-filter-list-of-objects-using-stream-without-filter)
6767
- [What is String Pool? How do Strings get there?](core.md#what-is-string-pool-how-do-strings-get-there)
68+
- [What is the difference between StringBuilder and StringBuffer?](core.md#what-is-the-difference-between-stringbuilder-and-stringbuffer)
6869

6970
## Collections
7071
- [What is the complexity for get in Hashmap?](collections.md#what-is-the-complexity-for-get-in-hashmap)

core.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
- [orElse() vs orElseGet() in Optional?](#orelse-vs-orelseget-in-optional)
4141
- [How to filter list of objects using Stream API without .filter()?](#howto-filter-list-of-objects-using-stream-without-filter)
4242
- [What is String Pool? How do Strings get there?](#what-is-string-pool-how-do-strings-get-there)
43+
- [What is the difference between StringBuilder and StringBuffer?](#what-is-the-difference-between-stringbuilder-and-stringbuffer)
4344

4445
## What's new in Java 8?
4546
+ Lambda expressions, Method Reference , Optional, Streams added.
@@ -296,4 +297,7 @@ String pool is the special memory region where Strings are stored by the JVM.
296297
###### Relative links:
297298
- https://www.baeldung.com/java-string-pool
298299

300+
## What is the difference between StringBuilder and StringBuffer?
301+
All public methods of StringBuffer are synchronized, it provides Thread safety but on a performance cost.
302+
299303
[Home Page](README.md)

0 commit comments

Comments
 (0)