A sequence of characters “abc” in Java is an object that implements an instance of String class, meaning this string object stores only the reference of this object in memory rather than the actual value.
Definition of String class: public final class String
extends Object
implements Serializable, Comparable<String>, CharSequence How to create a String object? //Declaration…