Result Split Java Code Example

Snippet 1

  // Java program to demonstrate working of split(regex, 
// limit) with small limit. 
public class GFG { 
    public static void main(String args[]) 
    { 
        String str = "[email protected]@geekss"; 
        String[] arrOfStr = str.split("@", 2); 
  
        for (String a : arrOfStr) 
            System.out.println(a); 
    } 
}  

Copyright © Code Fetcher 2020

 

 

Published

Leave a comment

Your email address will not be published. Required fields are marked *