+ 1

What we call a class in Java if it has all static methods like Math class ?

I think a class is called static class if it has a static keyword, do we call a class a static class if it has all static methods and static variables. only inner class can be static in Java.

6th Jul 2018, 2:59 PM
Atishay Jain
Atishay Jain - avatar
2 Antworten
+ 8
it because class cant be static or instance only data members and members function can be static or instance.... and inner class treated as a data member that why inner class is static or instance i hope this explain you why?
6th Jul 2018, 7:49 PM
Arun Tomar
Arun Tomar - avatar
+ 2
i don't think there's a specific name for those classes, but i could be wrong
6th Jul 2018, 3:03 PM
hinanawi
hinanawi - avatar