Return a value or not does not matter for a recursive function indeed. The core part is to terminate it. So I agree with you that something is wrong with the termination condition. So in my...
Type: Posts; User: garymar2013
Return a value or not does not matter for a recursive function indeed. The core part is to terminate it. So I agree with you that something is wrong with the termination condition. So in my...
The problem lies in the recursive function, which must return something to get the previous level where it was invoked. Pleaes try the following:
public class RecursiveFunctionTest {
private...
--Edited Post--
@garymar2013 Please also see the link in post #4
You are trying to compare one file with all the assignment files whose locations are stored in database. First thing to me is that there will be memory leak due to not closed buffered reader. ...
You may simplely use scanner.nextLine() to get a string and then compare it with "Yes" or "Y" and "No" or "N".
abstract variable? funny name. You need to understand the definition of abstract class(similiar to virtual class in C++). The abstract class is for later implementation use in its inheritance...
I think you should not initialize the variable minGrade = 0 because this values is the minimum value of all students' grade unless there is actaully a student who got "0". To initialize minGrade is...
Please try BigDecimal as well:
double big = 123456789.6;
System.out.println((new BigDecimal(Double.toString(big))).toPlainString());
//output:
//123456789.6