String : It helps you to manipulate character strings which are immutable.
StringBuffer: It’s to represent characters which can be modified.
You can get the maximum size of these two by Integer.MAX_VALUE (231 - 1 = 2,147,483,647) or you can divide maximum heap size by 2.
Interested in Java? Check out this Java Certification by Intellipaat.