Please note, this is a STATIC archive of website www.javatpoint.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Online Java Compiler By
JavaTpoint.com
public class StringExample{ public static void main(String args[]){ String s1="java"; char ch[]={'s','t','r','i','n','g','s'}; String s2=new String(ch); String s3=new String("example"); System.out.println(s1); System.out.println(s2); System.out.println(s3); }}
Output