Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Calling a value from a custom java package.?

I am rather new to Java. I am sure you all have heard that many times.

I am right now try to find a way to call a specific value from a custom package.

The value I am trying to call is declared in the custom package simply so this number can be called upon by multiple other classes.

2 Answers

Relevance
  • 9 years ago
    Favorite Answer

    If you can provide more details then I can help better.

    If the value is a static value declared in a class in that 'custom' package, then import the class:

    import packageName.myClass;

    The value would have to be public in that class.

    public static myVal;

    You get access to it from another class by using the class name:

    int localVal=myClass.myVal;

  • blea
    Lv 4
    4 years ago

    not something. telephone them and discover out what they want. it could not be on the subject count of that, or it could be which you may inform a splash white lie (saying that's used or something). The worst which could take place is that Customs costs you the VAT on the object.

Still have questions? Get your answers by asking now.