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 non-static variable. java?

Hello,

I have a non static variable in one class, that i would like to call to another class. how can i do this in java?

1 Answer

Relevance
  • 8 years ago

    You can only access non-static variable through it's object.

    Provide some more details of what you're trying to do and perhaps I can help more..

Still have questions? Get your answers by asking now.