I'm having a brain fart right now...
How do I take a series of chars and convert it to a complete string = "hello"
I have a loop where I'm able to get the individual char values = h,e,l,l,o
FileInputStream in = new FileInputStream(file);
int fileBuffer = 0;
char text = 0;
String completeString = "";
for(int i=0;i < 5; i++)
{
fileBuffer = in.read(); // found hello in file
text = (char)fileBuffer;
System.out.println(text) // *looping = h,e,l,l,o
//What do I do next to build completeString?
}
System.out.println(completeString) // hello
Dano
dan_kryzer@hotmail.com
What's your major malfunction
How do I take a series of chars and convert it to a complete string = "hello"
I have a loop where I'm able to get the individual char values = h,e,l,l,o
FileInputStream in = new FileInputStream(file);
int fileBuffer = 0;
char text = 0;
String completeString = "";
for(int i=0;i < 5; i++)
{
fileBuffer = in.read(); // found hello in file
text = (char)fileBuffer;
System.out.println(text) // *looping = h,e,l,l,o
//What do I do next to build completeString?
}
System.out.println(completeString) // hello
Dano
dan_kryzer@hotmail.com
What's your major malfunction