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 Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. ArrayList<String> s = new ArrayList<String>();
  13. char [][] arr= new char[3][2];
  14. arr[0][0] = 'a';
  15. arr[0][1] = 'b';
  16. arr[1][0] = 'a';
  17. arr[1][1] = 'b';
  18. arr[2][0] = 'T';
  19. arr[2][1] = 'T';
  20. for(char [] a : arr){
  21. s.add(new String(a));
  22. }
  23. for (String ss : s){
  24. System.out.println(ss);
  25. }
  26. System.out.println(s.contains("TT"));
  27. }
  28. }
Success #stdin #stdout 0.06s 380224KB
stdin
Standard input is empty
stdout
ab
ab
TT
true