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. {
  9. static String str;
  10. public void Constructor()
  11. {
  12. System.out.println("In constructor");
  13. str = "Hello World";
  14. }
  15. public static void main(String [] args)
  16. {
  17. // c.Constructor();
  18. System.out.println(str);
  19. }
  20. }
Success #stdin #stdout 0.07s 54596KB
stdin
Standard input is empty
stdout
null