Skip to main content

arrays

4 replies [Last post]
supriyanaidu
Offline
Joined: 2007-12-27
Points: 0

Hi

i want to convert a line in to arrays

while ((line = bis.readLine()) != null)

in this code in line the data is storing but i want that data in array format can give any suggestions

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
leeban99
Offline
Joined: 2005-12-23
Points: 0

u can also use StringTokenizer class for tokens

azlan95
Offline
Joined: 2003-09-17
Points: 0

String line;
byte[] bytearray;
char[] chararray;

while ((line = br.readline()) != null)
{
bytearray = line.getBytes(); // either this or
chararray = line.toCharArray(); // this

}

Azlan

supriyanaidu
Offline
Joined: 2007-12-27
Points: 0

Hi

thx for your reply .can you do another help for me about this code.

in my project actual point is when we read the line in this program na

that should be displayed separeately in different tabs using swings.

i am created all tabs all other .my guide told me use substring( ) it will work

tarbo
Offline
Joined: 2006-12-18
Points: 0

If you're looking to split a String into tokens, consider using [url=http://java.sun.com/javase/6/docs/api/java/lang/String.html#split(java.lang.String)]String.split(String regex)[/url].