Search:

Type: Posts; User: iamhealed

Search: Search took 0.12 seconds.

  1. [SOLVED] Re: Calling a non-static method outside the package without using extends

    wow..this is what i'm looking for!

    thanks!
  2. [SOLVED] Re: Calling a non-static method outside the package without using extends

    Ok, I know it needs to be static.

    Is there anyway where I can force the compiler to get the current instance of a class ??
    What I mean is, only MyClass can instantiate an object for MyClass....
  3. [SOLVED] Re: Calling a non-static method outside the package without using extends

    OtherClassOutsidePackage

    MyClass object = new MyClass();
    object.getMyVar()

    is this what you mean?

    this is not safe because the class is instantiated everytime it is called. I want only one...
  4. [SOLVED] Calling a non-static method outside the package without using extends

    Hello everyone,

    I am currently refactoring my codes and as much as possible i don't want to use static methods to avoid any conflicts when it comes to class instantiation.

    Here's my problem,
    ...
Results 1 to 4 of 4