File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

complicated problem i think

 
levi sleight
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 825
5
Java Python Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
levi sleight
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 825
5
Java Python Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6109
6
Android IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic