is it possible to put an array in a method, and have the same recursion call? how would the variable be returned in that case?
Type: Posts; User: melki0795
is it possible to put an array in a method, and have the same recursion call? how would the variable be returned in that case?
any ideas?
what are the benfits of a loop from a recursive call?
and any idea how i can apply the same concepts to a array, with 2 outputs?
double [] homeworkMark = new double[amountAssignment];
...
it was because of the integer parsing
Solution
public static int numberEntered = 0;
public static int studentNumberEntered(Scanner sc) {
public static int studentNumberEntered(int number, Scanner sc) {
int numberEntered = 0;
sc.reset();
try {
System.out.print("Student Number: ");
numberEntered =...
So this will just let me show an error right? i cannot really loop back... i think
Haven't learnt GUI's in Java yet!
Could you give me an example of what you mean?
Thanks!
If you enter say, a string, the program crashes. Is there a way to control what happens if a different data type is entered?
Any ideas of how I could reject character input when i ask the user for an integer?
Example
If i want him to enter age... It won;t let him spell it out with characters.
Best Regards
---...