Question: In this Java program I'm writing I’m finding that I’m clogging up the `main()` method with a lot of code that would make it hard to quickly understand/read. Specifically due to a lot of error checking that I’m doing. As a result I want to write a quick function that is only going to be used by this one method to improve readability.

Is writing another method within the class my only option or are there other alternatives?

Answer: 
> 
> Is writing another method within the class my only option or are there other alternatives? 
> 
> 
> 

It depends:

* If the methods should belong only to this class, they should be declared as `private` or `protected` methods in the class, depending if the class can be inherited or not.
* If the methods should be reused in other classes, it would be better to move it to utility classes as `public`. For example, check if a `String` is empty and also validating if is not `null`. Note that for this example there are methods covering these validations in utility classes from Apache Common Langs, explicitely [`StringUtils#isEmpty(String)`](http://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/StringUtils.html#isEmpty%28java.lang.String%29).

By the way, Java has methods, **no** functions.
Since Java was designed that way, you can only have methods. So, yes, that's the only way. Usually you would use class methods (static) for instance independent methods. These can also be within another class, for example a utility or helper class.