Java Interview Questions
1. What’s the difference between String, StringBuffer, and StringBuilder? String is an immutable class. In older JDKs the recommendation when programmatically building a String was to use StringBuffer since this was optimized to concatenate multiple Strings together. However, the methods StringBuffer were marked as synchronized, which meant that…