title: What is the maximum size of a `String` object in Java?
body: <p>A simple question: What is the maximum size (in bytes or characters) of a <code>String</code> object in Java?</p>
  
  <p>Some background info: I want to build a SQL statement (<code>INSERT INTO tbl VALUES (...), (...), ...</code>) and I don't want to exceed the size of the object.</p>