I have this main method which is static. netbean doesnt let me to call methods which are not static inside of the main .
it gives me error below
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - non-static method getConnection() cannot be referenced from a static context
here is my code
when I declare the methods static then its fine but I know that its not a good idea. what is the right way to call methods from static method with out making them static_ the way around?