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.

static class question?

dear, friends

i have declare a class name bookshelf static, but i feel i have lost my member variables and method when trying to initialize

{int size, int sizeLeft, void addBooks();} Bookshelf. //variable and method gone.

what is the problem

1 Answer

Relevance
  • 10 years ago
    Favorite Answer

    You need to specify which language you're writing in and maybe post more of the code...

    Is this Java? if so static can only be used on nested classes (classes inside classes)...

Still have questions? Get your answers by asking now.