• 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

Factory

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Each Roo should have a Moo and a Loo. Each Moo and Loo have names but how would I refer to to names of the parts of the Roo in the ROO_LIST?
 
Ranch Hand
Posts: 152
VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
alrighty, let's assume

Roo {

actually means

class Roo {

what does getInstance() return? An instance of Roo?

Where does the string returned by getStrin() on the instance
returned by getInstance() get set?

And what type is Object? A singleton?
I have been using getInstance() on singletons only.

Matt
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Agreed. This question seems to be about pseudo code than Java -- and even then, the question seems to be unclear.

Henry
 
William Pearson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, getInstance() returns the Singleton.
 
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No offence but I think that you should try to use less patterns and first learn java. And give us some more information because we're guessing. What is Object? Is it the java.lang.Object class? Then it's no wonder that it's not compiling because that class does not contain the static function getInstance.
 
William Pearson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is not java.lang.Object.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
William,
It is always a good idea to PostRealCode
 
Matt Cartwright
Ranch Hand
Posts: 152
VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

William Pearson wrote:It is not java.lang.Object.



If you ask others to answer your questions,
you should be s polite to answer theirs.

There was no doubt about that Object not being java.lang.Object.

So, what type is it?

And could you provide some code that actually
stands a chance to compile? Please.

Would help us to help you.

Matt
 
William Pearson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have found the answer to my question. I appreciate the help. Thanks.
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
 
reply
    Bookmark Topic Watch Topic
  • New Topic