Create Method in... generates static rather than instance methods


Hi there,

sometimes IntelliJ generates static methods, but i don't want to use this. Sometimes it generates instances methods.

What's the benefit of a static vs instance method?


In this case a instance method has been generated, but sometimes a static one is generated by intelliJ... can i stop the ide from doing so?


1 comment

IDEA should generate a static method if action is called from a static context, and non-static otherwise. Does it work for you differently? Please share a full code sample if it is so


Please sign in to leave a comment.