1.JAVASTRINGSLiang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved. 0-13-222158-6 12. The String ClassConstructing…