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...
Type: Posts; User: TopdeK
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...
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......
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...
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...
Awesomesauce!
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...
Really? My lecturer needs to get his facts right then. :P Thanks for the clarity
I'll see what I can do then. Thank you :)
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...
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...
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...
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:...
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...
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"...
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...
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...
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...
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?
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...
Anybody? :confused:
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...