Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

split in java

String text = "Int--String";
String[] parts = text.split("--");
String part0 = parts[0];//"Int"
String part1 = parts[1];//"String"
System.out.println(part0/*"Int"*/ + " is a datatype for a number and a " + 
                  part1/*"String"*/ + " is a datatype for a text.");

// Output: Int is a datatype for a number and a String is a datatype for a text.
Source by javarevisited.blogspot.com #
 
PREVIOUS NEXT
Tagged: #split #java
ADD COMMENT
Topic
Name
8+8 =