fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class string_class {
  9. public static void main(String args[])
  10. {
  11. String obj = "hello";
  12. String obj1 = "world";
  13. String obj2 = "hello";
  14. System.out.println(obj.equals(obj1) + " " + obj.equals(obj2));
  15. }
  16. }
Success #stdin #stdout 0.06s 2841600KB
stdin
Standard input is empty
stdout
false true