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.
Trending News
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
- Anza PowerLv 410 years agoFavorite 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)...