fork(2) 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 Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. static String s1,s2,s3,s4;
  13.  
  14. s1 = new String("CAT");
  15. s2 = new String("DOG");
  16. s3 = new String("RAT");
  17. animal(s1,s2);
  18. System.out.println(mixThem(s2,s3));
  19.  
  20. } //main
  21. private static void animal (String a1, String a2) {
  22. if(a1.equals(a2))
  23. System.out.println(a1);
  24. else
  25. System.out.println(a2);
  26. }
  27. private static String mixThem (String b1, String b2){
  28. String c1 = b1;
  29. b1 = b2;
  30. b2 = new String ("HAT");
  31. System.out.println(b1);
  32. System.out.println(b2);
  33. System.out.println(c1);
  34. System.out.println(s2);
  35.  
  36. return b2;// your code goes here
  37. }
  38. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:12: error: illegal start of expression
		static String s1,s2,s3,s4;
		^
1 error
stdout
Standard output is empty