title: How to fix RuntimeException?
body: <pre><code>import java.sql.Connection;
  
  public static void main(String[] args) throws SQLException, RuntimeException {
  
  
      try{
  
             DriverManager.registerDriver(new com.mysql.cj.jdbc.Driver());
                         
     String connectionURL=&quot;jdbc:mysql://localhost:3306/aaa?useUnicode=true&amp;useJDBCCompliantTimezoneShift=true&amp;useLegacyDatetimeCode=false&amp;serverTimezone=UTC&quot;;
    String login=&quot;root&quot;;
    String password=&quot;aaa&quot;;
          
          
          try (Connection conn = DriverManager.getConnection(connectionURL, login, password)) {
              Statement stmt = conn.createStatement();
              
              
              ResultSet rs = stmt.executeQuery(&quot;SELECT * FROM Lista1&quot;);
              
              
              while(rs.next()) {
                  System.out.println(rs.getString(&quot;nazwa&quot;));
              }
              rs.close();
              
              
              stmt.close();
          }
      }
      
      catch(SQLException e) {
           System.out.println(&quot;Blad polaczenia:&quot;);
            e.printStackTrace();
      }
      
      catch(RuntimeException e) {
           System.out.println(&quot;Blad polaczenia:&quot;);
            e.printStackTrace();
      }
  </code></pre>
  <p>The console log throws:</p>
  <pre><code>    Exception in thread &quot;main&quot; java.lang.RuntimeException: 
  at cccc.web.Main.main(Main.java:1)
  </code></pre>
  <p>I tried to delete return, but it still threw bad issue.
  I tried many things but I don't know how to fix it.
  I don't know how to solve it. And I spent many many many times to fight with it!!!!</p>