Skip to main content
Progzoo.net
Tutorials
Guides
Edit
Java
C#
C++
Perl
PHP
Python
Ruby
VB
Hide Sidebar
Show Sidebar
<Progzoo Sections>
ProgZoo
Tutorials
How to...
Assessments
Help
<Other>
To do list
Recent changes
Random page
Personal
Log in / create account
Views
Article
Discussion
Edit
History
Toolbox
What links here
Related changes
Upload file
Special pages
Printable version
Split a String
From Progzoo
String Functions
String Length
Equal Strings
Substring
Join Strings
Special Characters
Upper Case
Lower Case
Find Position
Split a String
Formatting
You can create an array of strings from a single string.
.
String s = "zero one two three"; String [] a = s.split(" "); System.out.println(a.length); System.out.println(a[0]); System.out.println(a[1]); System.out.println(a[2]); System.out.println(a[0]);
[
Font
] [
Default
] [
Show
] [
Resize
]
test text