• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

complicated problem i think

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 825
5
Python Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Python Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic