• Cours
  • Compilateur de code
  • Discuter
  • Tarification
  • Équipes
Menu
+ 1

Why can't we have static method in a (non-static) inner class?

Instance variable and methods can't be static Could you answer me ?

javastaticinner-classesclass
9th May 2022, 9:18 PM
Mohamed
Mohamed - avatar
2 Réponses
+ 3
Hope this helps: https://stackoverflow.com/questions/975134/why-cant-we-have-static-method-in-a-non-static-inner-class-pre-java-16
9th May 2022, 9:45 PM
Denise Roßberg
Denise Roßberg - avatar
+ 1
Denise Roßberg Thanks dude 🙂
10th May 2022, 2:50 PM
Mohamed
Mohamed - avatar

Vous avez souvent des questions comme celle-ci ?

Apprenez de maniĂšre plus efficace, gratuitement :

  • Introduction Ă  Python

    7.1M apprenants

  • Introduction Ă  Java

    4.7M apprenants

  • Introduction Ă  C

    1.5M apprenants

  • Introduction Ă  HTML

    7.5M apprenants

Voir tous les cours
Aujourd'hui en vedette
Hello World!
0 Votes
What is wrost mistake that mostly people made while learning coding?
0 Votes
I'm lost with JavaScript (document.getElementById(".") And clearly making mistakes, Can someone help, I thought I had it but no.
0 Votes
What’s the actual difference between MB and GB in real-world usage?
1 Votes
Script file names
0 Votes
How to put multiple inputs in python?
1 Votes
What can I do after learning python and how to create amazing codes. And how many times it would take to be a good programmer😅
0 Votes
What to learnđŸ€”
0 Votes
I wish Ruby back in the course list
1 Votes
Messages problem
0 Votes