String Vs Stringbuffer Vs Stringbuilder

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Source Code repositories : git vs svn

Build tools for Java Applications: ant vs maven vs gradle vs bazel

https://stackshare.io/stackups/bazel-vs-gradle-vs-maven

Favor Composition over Inheritance

When you use inheritance to reuse code from the superclass, rather than to
override methods and define another polymorphic behavior, it's often an indication that
you should use composition instead of inheritance.

Java persistence strategy hibernate over jdbc

Key concept of Spring: inversion of control

Difference depanday methos : dependency injection vs dependency lookup

Java building strategies: late binding vs early binding

Java String related classes: String vs StringBuffer vs StringBuilder

String vs StringBuffer vs StringBuilder


1. String is immutable whereas StringBuffer and StringBuider are mutable
classes.
2. StringBuffer is thread safe and synchronized whereas StringBuilder is not,
thats why StringBuilder is more faster than StringBuffer.
3. String concat + operator internally uses StringBuffer or StringBuilder class.
4. For String manipulations in non-multi threaded environment, we should use
StringBuilder else use StringBuffer class.

Synchronized block vs Synchronized method

Object immutability in Java

REST vs SOAP

Check your ability of coding task: algorithmic questions 1

1. Reverse a text

2. Check a given text is Palindrome or not


3. Implement a pool of objects by its object

Java Garbage collection methods

Java has four types of garbage collectors. These are:-

1. Serial Garbage Collector- S GC


2. Parallel Garbage Collector- P GC
3. CMS Garbage Collector- CMS GC
4. G1 Garbage Collector- G1 GC
Default implementations of GC in java -

- Java 7 - P GC
- Java 8 - P GC
- Java 9 - G1 GC
- Java 10- G1 GC

For more details , please visit


https://javapapers.com/java/types-of-java-garbage-collectors/

https://rabbitear.org

You might also like