Search:

Type: Posts; User: alex067

Page 1 of 2 1 2

Search: Search took 0.10 seconds.

  1. Replies
    1
    Views
    273

    Need help understanding this code!

    I have a midterm coming up tomorrow night, and it's basically us reading a set of codes and seeing where the errors are and what set of codes are needed to make the program compile succesfully.

    ...
  2. Replies
    9
    Views
    327

    Re: Program not ending correctly

    So if I wanted tcode 3 to terminate the program, wouldn't my while statement be:

    }while (tcode > 0 || tcode < 3);

    this statement means, if tcode is greater than 0, and tcode is less than 3,...
  3. Replies
    9
    Views
    327

    Re: Program not ending correctly

    So if I wanted tcode 3 to terminate the program, wouldn't my while statement be:

    }while (tcode > 0 || tcode < 3);

    this statement means, if tcode is greater than 0, and tcode is less than 3,...
  4. Replies
    9
    Views
    327

    Re: Program not ending correctly

    Values of tcode that would end the loop would just be 3

    Values for tcode to stay in the loop would be 1,2

    So I would do, }while (tcode > 0 || tcode < 3) ? So for every tcode greater than 0 (to...
  5. Replies
    9
    Views
    327

    Re: Program not ending correctly

    So how should the while statement be constructed in order to make tcode = 3 to input the last of the transaction and end the program?
  6. Replies
    9
    Views
    327

    Program not ending correctly

    import javax.swing.JOptionPane;
    import java.text.DecimalFormat;
    public class Assignment1
    {



    public static CheckingAccount info;
  7. Replies
    1
    Views
    437

    Good online tutorials?

    Unfortunately my Java instructor's teaching method is to just show us various programs and stat what each line does.


    I don't find this teaching method very helpful as I just completely forget...
  8. Replies
    15
    Views
    736

    Re: Error, NullPointerException

    No need to act cocky, I've done exactly what you've said and it didn't print anything out.

    You told me to put those 2 statements before message =



    }while(tcode < 0 || tcode > 2);
    ...
  9. Replies
    15
    Views
    736

    Re: Error, NullPointerException

    I printed those 2 new statements right after the last message but nothing printed out apart from the error I previously posted.

    I put those 2 statements right before the }while message right?
  10. Replies
    15
    Views
    736

    Re: Error, NullPointerException

    I printed the 2 system.out.println for formatter and info and the runtime error states:


    Exception in thread "main" java.lang.NullPointerException
    at...
  11. Replies
    15
    Views
    736

    Re: Error, NullPointerException

    Well the runtime errors stats that it's at line 174 and 72.

    line 174 is the last message string in the if else statement in the main method, where


    else
    {
    message = "Transaction: Check in...
  12. Replies
    15
    Views
    736

    Re: Error, NullPointerException

    So in order to fix it, I would remove the null in the line the error stated?
  13. Replies
    15
    Views
    736

    Error, NullPointerException

    Sup guys, I have 2 questions.

    1) I am getting a compiler error which states this exactly:
    run:
    Exception in thread "main" java.lang.NullPointerException
    at...
  14. Replies
    5
    Views
    346

    Re: Don't understand void methods, need help!

    My updated code for the input is:




    do
    {
    int tcode;
    tcode = getTransCode();
  15. Replies
    5
    Views
    346

    Re: Don't understand void methods, need help!

    Sorry for being rather vague.


    The instructions are:

    Write a class with methods to help you balance your checking account(an object class-main method is not in this class). The CheckingAccount...
  16. Replies
    5
    Views
    346

    Don't understand void methods, need help!

    I have an assignment which consists of obtaining a balance from the user, then depending on the type of transaction, return the results of their balance. It's a transaction program.

    My current...
  17. Replies
    3
    Views
    299

    Re: Help with transaction assignment

    The messiness is due to the fact that my instructor provides us with a sample code, thus those helper methods were provided but not filled out.
  18. Replies
    3
    Views
    299

    Help with transaction assignment

    import javax.swing.JOptionPane;
    public class Assignment1
    {



    public static CheckingAccount info;
  19. Replies
    10
    Views
    937

    Re: Checking Account class, need help

    That's all the compiler error gave me I'm afraid.


    My main question is regarding the main procedural step and how I should proceed from where I left off, as I'm a bit lost on what to do at the...
  20. Replies
    10
    Views
    937

    Re: Checking Account class, need help

    When I compile the error states:

    main at exception breakpoint java.lang.RuntimeException
    Assignment1.main:30
  21. Replies
    10
    Views
    937

    Re: Checking Account class, need help

    It just says identifer expected, there's nothing more.


    The error can be seen as I've pasted right under public class assignment1
  22. Replies
    10
    Views
    937

    Re: Checking Account class, need help

    The only error that came up was identifer expected, nothing else. I am running Netbeans IDE.
  23. Replies
    10
    Views
    937

    Checking Account class, need help

    Sup folks, I have a rather unorganized homework assignment which consists of creating a program which stores the users initial balances and maintains their checking account.

    The assignment...
  24. Replies
    4
    Views
    472

    Re: Simple question regarding objects.

    I read the links you gave me, and I'm very sorry in advance for the multiple threads.

    I've extensively read the links, but I'm just confused on the instance methods.
    ...
  25. Replies
    4
    Views
    472

    Simple question regarding objects.

    Hey guys. I'm having trouble on a beginners java assignment, and not touching Java in two years has not helped at all.

    My question is relatively easy and is for beginners;

    I am to create a...
Results 1 to 25 of 32
Page 1 of 2 1 2