Search:

Type: Posts; User: garymar2013

Search: Search took 0.09 seconds.

  1. Replies
    6
    Views
    5,733

    Re: Recursive Method to count vowel

    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...
  2. Replies
    6
    Views
    5,733

    Re: Recursive Method to count vowel

    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...
  3. Replies
    4
    Views
    1,339

    Re: Guess the error in the code

    --Edited Post--
    @garymar2013 Please also see the link in post #4
  4. Re: I need to fix this algorithm please. Do you have any suggestion to make this algorithm working fine.thanks

    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. ...
  5. Replies
    6
    Views
    969

    Re: Need help with character as a varible

    You may simplely use scanner.nextLine() to get a string and then compare it with "Yes" or "Y" and "No" or "N".
  6. Replies
    6
    Views
    1,435

    Re: Abstract type in java

    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...
  7. Replies
    2
    Views
    1,108

    Re: Problem with finding value from array

    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...
  8. Replies
    3
    Views
    1,354

    Re: Formatting this number.

    Please try BigDecimal as well:
    double big = 123456789.6;
    System.out.println((new BigDecimal(Double.toString(big))).toPlainString());
    //output:
    //123456789.6
Results 1 to 8 of 8