fork download
  1. class StringObj {
  2. public static void main(String[] args) {
  3. String[] a = {"DEF", "ABC"};
  4. String b = "ABC";
  5. String c = "A" + "B" + "C";
  6. String d = new String();
  7. d = "ABC";
  8. System.out.println(a[1] == b);
  9. System.out.println(a[1] == c);
  10. System.out.println(c == d);
  11. }
  12. }
Success #stdin #stdout 0.07s 380224KB
stdin
Standard input is empty
stdout
true
true
true