Error:(35, 62) java: void cannot be dereferenced : I'm trying to call a stored procedure using CallableStament, but when I do call the method for it  returns Error:(35, 62) java: void cannot be dereferenced. 

Code:

> public class Connect  {
> 
>     public void connDB() throws Exception {
> 
> 
>         Class.forName("oracle.jdbc.driver.OracleDriver");
> 
>         try (Connection conn = DriverManager.getConnection(
>                 "jdbc:oracle:thin:@test123:4321:test1", "test", "test")) {
> 
>             if (conn != null) {
>                 System.out.println("Connected to the database!");
>             } else {
>                 System.out.println("Failed to make connection!");
>             }
> 
>         } catch (SQLException e) {
>             System.err.format("SQL State: %s\n%s", e.getSQLState(), e.getMessage());
>         }
>         catch (Exception e) {
> 
>         }
>     }
> 
>         public void callablestatement(int resync_value){
>         Connect conectivitateDb = new Connect();
> 
>      CallableStatement stmt = conectivitateDb.connDB().prepareCall("{call
>      resync_entity.resync_this_entity(?)}");
>
>             stmt.setInt(1, resync_value);
>             stmt.execute();
>         } }


If I do the callable statement in the try catch block in from the conndb method, it works just fine.
