Just start with the loop.
Then add the other stuff one thing at a time.
There are hundreds of pieces of code on this forum and thousands on the internet.
Search here or Google for samples.
...
Type: Posts; User: Norm
Just start with the loop.
Then add the other stuff one thing at a time.
There are hundreds of pieces of code on this forum and thousands on the internet.
Search here or Google for samples.
...
Time to use the compiler and see what it thinks.
Not quite.
You should use the length of the String to control the number of loops. Don't hard code a 4.
You've mixed the data type and the variable name: char aChar = 0; char < 4; char++
char is a...
You do it pretty much just like you asked:
write a loop -> See for() loop for example
in the loop get the char from the String one by one -> Read the String class API doc for the method
Ok. Normally I think of "display" as something that a human can see. Putting a value in an array is differeent than displaying it.
You "display" a String by using System.out.println to a console or...
Have you read the String class API documentation? The String class has methods to get at the individual characters in the String. You could write a loop to iterate over the String and get the char...