• 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

I don't know how to call my object?!!!!

 
Ranch Hand
Posts: 291
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends,
Based on my schema the association of the programs are like this(from left to right):
Sbug.java---Model.java---BugTable.java---Bug.java
My question is, how can I call Sbug.java to pass obug(it is an object in bug.java) since Sbug.java needs this object for output.
Please let me know if you need my code.
Appreciated your help...
Elahe
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Elahe
I'm not sure I understand the question:
You have an object of type Sbug that needs to get an object of type Bug into one of its methods?
Or,
You have an object of type Sbug that needs to be turned into a Bug object in another method?
According to your hierarchy an Sbug is a Bug object so you can always just cast an Sbug object to a Bug object.
If that doesn't help, try to explain the question in a different way or post a piece of code showing what you are trying to do.
 
Elahe Shafie
Ranch Hand
Posts: 291
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dave here is piece of code for Bug.Java as you can there is oBug that needs to return to S-bug.java how S-bug.java can get this object(oBug)?
Please let me know if it is not clear Dave.
Many thanks,
Elahe

[ May 22, 2002: Message edited by: Thomas Paul ]
[ May 22, 2002: Message edited by: Dirk Schreckmann ]
 
Elahe Shafie
Ranch Hand
Posts: 291
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry name is Sbug.java not S-bug.java
 
Elahe Shafie
Ranch Hand
Posts: 291
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So the question is how how Sbug.java can get this object(oBug)from Bug.java?
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
elahe
As long as the class Bug is reachable and accesable by the class that has that method then you'll get a Bug object when you call its constructor.
If that's not what you were looking for let me know - sorry if I misunderstood.
 
Elahe Shafie
Ranch Hand
Posts: 291
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I solved this part...Dave you are always great! thanks for your help.
 
reply
    Bookmark Topic Watch Topic
  • New Topic