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. private static void wypisz(String s)
  11. {
  12. String x = s.substring(1, s.length() - 2);
  13. System.out.println("1: " + x);
  14.  
  15. String y = s.substring(1, s.length() - 1);
  16. System.out.println("2: " + y);
  17. }
  18.  
  19. public static void main (String[] args) throws java.lang.Exception
  20. {
  21. wypisz("[po, czyms, takim]");
  22. }
  23. }
Success #stdin #stdout 0.07s 380160KB
stdin
Standard input is empty
stdout
1: po, czyms, taki
2: po, czyms, takim