Results 1 to 2 of 2
Thread: String arrays
- 03-18-2010, 08:36 PM #1
Member
- Join Date
- Mar 2010
- Posts
- 10
- Rep Power
- 0
String arrays
hi all,
Assume I have a String ,
like;
Java Code:String str= "01hhqwgnfklnlkgfkvvokopoepw";
I need to divide this string in to small string blocks (2 characters in one block) and those divided blocks in to a another string array without writing a big code is there a easy way...
my result should be:
Java Code:String strArray[]= {"01","hh","qw".....etc};
thanks a lot
- 03-18-2010, 08:49 PM #2
First and easy thing that comes to mind is a loop and String.substring(). Experiment and post if you get stuck.
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
Similar Threads
-
Scanner, while loop and sorting arrays/string?
By RSYR in forum New To JavaReplies: 10Last Post: 04-20-2011, 07:13 PM -
Indexing java arrays with string
By Jackblue in forum Advanced JavaReplies: 10Last Post: 09-30-2009, 02:48 PM -
combine string[] into string like perl's join function
By tekberg in forum Advanced JavaReplies: 9Last Post: 02-23-2009, 02:05 PM -
Let eclipse warn about a semicolon after an if statement and string == string?
By foobar.fighter in forum EclipseReplies: 5Last Post: 01-11-2009, 11:12 AM -
Using java.util.Scanner to search for a String in a String
By Java Tip in forum Java TipReplies: 0Last Post: 11-20-2007, 05:59 PM
Bookmarks