Social control theory. In criminology, social control theory proposes that exploiting the process of socialization and social learning builds self-control and reduces the inclination to indulge in behavior recognized as antisocial.
A simple call to the close() method will do the job. If you close the Connection object first, it will close the PreparedStatement object as well. However, you should always explicitly close the PreparedStatement object to ensure proper cleanup. For a better understanding, let us study Prepare-Example Code.
You are here: Home Â» Java Â» How to fix âCannot make a static reference to the non-static methodâ. Static methods cannot call non-static methods. An instance of the class is required to call its methods and static methods are not accociated with an instance (they are class methods).