Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on What are the disadvantages of using static methods in Java?
Post
What are the disadvantages of using static methods in Java?
I was using static method few moments ago. But I noticed that I was returning a variable using that static method. According to the article,
Static is a keyword that identifies the class-related thing. It means the given Method or variable is not instance-related but Class related. It can be accessed without creating the instance of a Class.
I think I can access the static method without caring of class, isn't it? Is there something special of static method? static method can helps to decrease amount of source code. So Is it better to use static method? Or is there any limit of it?
1 comment thread