Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java print a line seperate by space

public class SimpleTesting{
    public static void main(String[] args) { 
        String str = "Hello This is DelfStack";
        String[] newStr = str.split("s+");
        for (int i = 0; i < newStr.length; i++) {
            System.out.println(newStr[i]);
        }
    }
}
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #java #print #line #seperate #space
ADD COMMENT
Topic
Name
2+3 =