Search:

Type: Posts; User: TopdeK

Search: Search took 0.15 seconds.

  1. Re: how to solve the constructor problem? " return new Accounts

    Someone with more experience can correct me on this but I would like to hazard a guess that its because you have no actual constructor made in your AccountsDB class. "return new Account (....) " is...
  2. Re: how to solve the constructor problem? " return new Accounts

    Can you edit your post and put your code into a set of highlight bracket please. It makes code much more readable.

    ["highlight=java"] code goes here ["/highlight"]

    Just remove the quotes......
  3. Replies
    4
    Views
    912

    Re: Missing return statement

    I modified your main code a bit to reflect what I think you wanted to do. Firstly you seem to exit the program if the user enters a zero but there is no notice to the user about this. Secondly I'm...
  4. Replies
    4
    Views
    912

    Re: Missing return statement

    Class names DON'T have to be capitalized. Its just a good coding convention that you do. I was corrected on this fact earlier this week. Also, tomejuan is correct in saying that the reason you have a...
  5. Replies
    18
    Views
    1,141

    Re: What's Wrong With My Code?

    Awesomesauce!
  6. Replies
    11
    Views
    658

    [SOLVED] Re: Make it stop looping! please. :)

    No problem at all. I'm always making simple mistakes and I know its always something small that I've overlooked. Outside perspective is a life saver! Besides, I'm still only a beginner really when it...
  7. Replies
    18
    Views
    1,141

    Re: What's Wrong With My Code?

    Really? My lecturer needs to get his facts right then. :P Thanks for the clarity
  8. Replies
    5
    Views
    2,410

    Re: Multi-Threaded Chat Server

    I'll see what I can do then. Thank you :)
  9. Replies
    18
    Views
    1,141

    Re: What's Wrong With My Code?

    Classes need to begin with a Capital letter. So in this case, "time" should be "Time". Change all the mentions of "time" to "Time" and all will be fine. Also I noticed that your validate() method is...
  10. Replies
    5
    Views
    2,410

    Re: Multi-Threaded Chat Server

    What I mean by this is that if I have two EchoClient programs running in two separate command prompts and have the MyChat server in another, then whatever I type into "EchoClient 1" should appear in...
  11. Replies
    11
    Views
    658

    [SOLVED] Re: Make it stop looping! please. :)

    Your code keeps failing to print because you are asking it to print blanks. Nowhere in the code does it ask the user for his/her actual name. Just the login name. So I added this piece of code just...
  12. Replies
    11
    Views
    658

    [SOLVED] Re: Make it stop looping! please. :)

    When you type in 433 as your response, what happens?

    EDIT: Actually, if I remember right toString() is only auto-called by the compiler during string concatenation (i.e object + " "). So try this:...
  13. Replies
    11
    Views
    658

    [SOLVED] Re: Make it stop looping! please. :)

    At a glance, I think the reason your list is producing null is because you ARE adding a null! The "Account" is constructed outside the main while loop and no other "Account" is created for the new...
  14. Replies
    11
    Views
    658

    [SOLVED] Re: Make it stop looping! please. :)

    I'll have a look but can you do something for me please. Its much easier to read your code with the highlighter on. Edit your [CODE] brackets to be [highlight]. In the first one say "highlight=java"...
  15. Replies
    11
    Views
    658

    [SOLVED] Re: Make it stop looping! please. :)

    Correct me if I'm wrong but is it possible that since there is nothing in the ArrayList then the for loop is not executing, hence leaving loginClear to be false??

    i.e if ArrayList.size() returns...
  16. Thread: Learning Java

    by TopdeK
    Replies
    7
    Views
    518

    Re: Learning Java

    Is this useful to you at all?

    - Main now has 2 arrays declared in it called intArray and charArray. intArray is for the storage of the values created in numbers.

    - Numbers() method takes the...
  17. Replies
    3
    Views
    318

    Re: Array code not producing, thoughts?

    Oh I think I know what it is...

    You've declared "import java.util.ArrayList" in the BankAccount2 class and not in the ArrayListTester class. I presume since you have BankAccount2 as a public...
  18. Replies
    3
    Views
    318

    Re: Array code not producing, thoughts?

    Dude, I got the exact output you wanted when I ran this program.
    Size: 3
    First account number is: 1008
    Last account number is: 1729

    What is not working for you?
  19. Re: copying numbers stored in one 2d array into a new 2d array with different dimensi

    An easy enough solution of the top of the head would be to take the contents of the first array and store them in a temporary 1 dimensional array. Then transfer them over to your new array. Probably...
  20. Replies
    5
    Views
    2,410

    Re: Multi-Threaded Chat Server

    Anybody? :confused:
  21. Replies
    5
    Views
    2,410

    Multi-Threaded Chat Server

    I'm having problems with my ChatServer. I think I have done most of it correctly but it fails to print out to all active clients. It prints to each of them independently but just not as an overall...
Results 1 to 21 of 21