PJF16

String Split Demonstration

Mar 11th, 2014
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1. package testingthings;
  2.  
  3. /**
  4.  *
  5.  * @author philipp
  6.  */
  7. public class TestingThings {
  8.  
  9.     /**
  10.      * @param args the command line arguments
  11.      */
  12.     public static void main(String[] args) {
  13.         TestingThings t = new TestingThings ();
  14.        
  15.         t.testing();
  16.     }
  17.    
  18.     public void testing () {
  19.        
  20.         String test = "ichetest";
  21.         String[] split;
  22.         split = test.split("e");
  23.        
  24.         System.out.println(split[0]);
  25.         System.out.println(split[1]);
  26.         System.out.println(split[2]);
  27.         System.out.println(test);
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment