When you get that message when using a java class, you need to go to the API doc and find what package the class is in and add an import statement for it so the compiler can find the class's...
Type: Posts; User: Norm
When you get that message when using a java class, you need to go to the API doc and find what package the class is in and add an import statement for it so the compiler can find the class's...
You were to copy the code in post#12 and replace: <arraynamehere> with the name of the array you wanted to format for printing.
Where is the code that I showed you to use to format the array for printing?
You were to copy the code and replace: <arraynamehere> with the name of the array you wanted to format for printing.
Please post the code that printed out what you posted in post#15.
No, each element in an array holds one value.
Did you compare the numbers you printed with the numbers that are in the input...
Print out the value of the String: str to see what is there to be split.
Check the indexes you are using in the arrays. How many elements does the array placeHolder have? How many does grades...
Please post the code and what is printed out.
A good way to format the contents of an array for printing is to use the Arrays class's toString() method:
...
Do it in separate steps:
1) read the line with the numbers into a String
2) split the String into parts. The split() method returns an array: See the String class's API doc.
3) parse each String...
After using split() you will need to convert the Strings to int values
What technique to use depends on what the OP knows and/or what the assignment requires.
Do you have a technique for getting the each of the four grades from the line that they are on?
The line with the grades has more than one number on it with spaces between the numbers. parseInt() does not like those spaces and throws the exception.
How are you going to store those four...