Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Replies
    20
    Views
    957

    Re: Putting an exception in an method

    Did you google what "in scope" means?
    A simple example is anything defined within a {} pair is not in scope outside of the {}s
  2. Replies
    20
    Views
    957

    Re: Putting an exception in an method

    Is that in scope where it is being used that caused the error?

    Are you asking this question on other sites? Please post a link on both sites to the other site.
  3. Replies
    20
    Views
    957

    Re: Putting an exception in an method

    Where is the variable: overdraft defined that is in scope where it is being used?
  4. Replies
    20
    Views
    957

    Re: Putting an exception in an method

    Does the code execute correctly now? Do you get the expected results?
  5. Replies
    20
    Views
    957

    Re: Putting an exception in an method

    You left off the line(s) that give the symbol that can be found.


    TestCode26.java:363: error: cannot find symbol
    int x = that;
    ^
    symbol: variable that <<<<<<<< This...
  6. Replies
    20
    Views
    957

    Re: Putting an exception in an method

    The ^ does not align with where the error was. Wrapping lines in code tags will preserve spacing. The ^ should be under accountNo.

    Banking.java:29: error: <identifier> expected
    private Acount...
  7. Replies
    20
    Views
    957

    Re: Putting an exception in an method

    That was just an example of how to create account numbers that could make it harder for some one to create a valid number without understanding the algorithm. For your case just adding 1 will work.
  8. Replies
    20
    Views
    957

    Re: Putting an exception in an method

    How is an account number created? Is there a value or list that can be used to determine if a number is valid?

    That looks like the valid account numbers range in value from the first account...
  9. Replies
    20
    Views
    957

    Re: Putting an exception in an method

    The code currently throws exceptions when exceptional conditions are found. Not sure what this question is about.


    What code creates valid account numbers? Does it save a list of valid account...
Results 1 to 9 of 9