bcgreen

bcgreen

  • NA
  • 3
  • 0

Sharing Objects Among Methods

Jan 13 2004 1:54 AM
OK, here's the deal. I've declared a class, and want to reference it in another class...so, I use the statement: class myclass = new class(); OK, so far so good...I can use the fields and methods of the class through this instantiated object just fine but only in the method it's delcared in. If I try to reference "myclass" in another method, it basically doesn't exist. So stupid question: how do I create an object that can be "seen" by all methods in a class? Thanks much! Bryan

Answers (2)