Extract static methods from main() file in java -


i'm quite new java , wrote little to-do list project. @ beginning of project added bunch of static methods file main() code is, , got little out of hand. want transfer these methods file. there proper way this, or have create sort of behaviour class these methods, , in main() create instance of call it's methods?

you can extract these methods separate class (say fooutils), , in main method can call them using class name - fooutils.somestaticmethod()

depending on have, may make sense group methods different classes, or make them instance methods.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -