import java.util.*;
import java.lang.*;
import java.io.*;

// The main method must be in a class named "Main".
class Main {
    public static void main(String[] args) {
        String text1 = "Hello";
        String text2 = "Hello";
        String text3 = "He" + "llo";
        String text4 = new String("Hello");
        String text5 = new String(text1);
        String text6 = new String(text4);
        String text7 = String.valueOf("Hello");
        String text8 = String.valueOf(text1);
        String text9 = String.valueOf(text4);
        String text10 = new String("Hello").intern();
        String text11 = String.valueOf("Hello").intern();
        String text12 = String.valueOf(text4).intern();

        System.out.println(String.format("text1 == text2: %s" , text1 == text2));
        System.out.println(String.format("text1 == text3: %s" , text1 == text3));
        System.out.println(String.format("text1 == text4: %s" , text1 == text4));
        System.out.println(String.format("text1 == text5: %s" , text1 == text5));
        System.out.println(String.format("text1 == text6: %s" , text1 == text6));
        System.out.println(String.format("text1 == text7: %s" , text1 == text7));
        System.out.println(String.format("text1 == text8: %s" , text1 == text8));
        System.out.println(String.format("text1 == text9: %s" , text1 == text9));
        System.out.println(String.format("text1 == text10: %s" , text1 == text10));
        System.out.println(String.format("text1 == text11: %s" , text1 == text11));
        System.out.println(String.format("text1 == text12: %s" , text1 == text12));
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: