This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes complicated problem i think Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "complicated problem i think" Watch "complicated problem i think" New topic
Author

complicated problem i think

levi sleight
Greenhorn

Joined: Sep 19, 2012
Posts: 19
ok, sorry ive posted so many questions in the last week, but im tearing my hair out over this, just, please look over my code and tell me whats wrong

part 1




part 2:



part 3:






ok, so heres the problem, the output for running this, is supposed to be:
the constructor for the is 4/6/5
my name is greg my birthday is 4/5/6

but instead its:
the constructor for the is 4/6/5
4/5/6


ive looked through this 30 or 40 times, and i cant find the problem, PLEASE im begging you help me
Kemal Sokolovic
Bartender

Joined: Jun 19, 2010
Posts: 825
    
    5

You are printing just your first object, and toString method of your second class gives the result you expect.

Keep in mind that you are showing disrespect to each and everyone here, from whom by the way you expect to help you (now and further). Naming classes the way you did and posting them with such names here is extremely rude, no matter how original or whatever you try to make yourself. Just remember that here are many professionals, people much older from both me and you (probably), who share experience and help all of us be better at what we do and this is not the way to comunicate with anyone, especially not them.


The quieter you are, the more you are able to hear.
levi sleight
Greenhorn

Joined: Sep 19, 2012
Posts: 19
holy crap man, i totally forgot about the names and stuff, i wasnt trying to offend anyone, i just name stuff ridiculous things when im messing around with code , i wasnt trying to offend anyone, i totally forgot, i hope you can realize that i meant no harm when i posted this, i was just asking an inocent question
Kemal Sokolovic
Bartender

Joined: Jun 19, 2010
Posts: 825
    
    5

levi sleight wrote: i was just asking an inocent question


And you got an answer. Obviously it helped, since your edited code seems to be giving the result you expected.
levi sleight
Greenhorn

Joined: Sep 19, 2012
Posts: 19
yes thank you very much it did work, i still find it wierd because, erm, the extra line i added to run the second object wasnt in the tutorial i was reading, guess ill never know what else was wrong
Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

levi sleight wrote:guess ill never know what else was wrong


That's entirely up to you. If you're serious about learning Java and want to pursue it, you'll certainly find people here who will help you come to an understanding.
 
 
subject: complicated problem i think
 
Similar Threads
Date Class Problems
Spotting errors
Error - ; expected
help creating mutator
Custom Date class and Appointment class