Here you can find the source of printWarnings(SQLWarning warning)
public static void printWarnings(SQLWarning warning) throws SQLException
//package com.java2s; import java.sql.SQLException; import java.sql.SQLWarning; public class Main { public static void printWarnings(SQLWarning warning) throws SQLException { if (warning != null) { System.out.println("\n---Warning---\n"); while (warning != null) { System.out.println("Message: " + warning.getMessage()); System.out.println("SQLState: " + warning.getSQLState()); System.out.print("Vendor error code: "); System.out.println(warning.getErrorCode()); System.out.println(""); warning = warning.getNextWarning(); }//w w w. j av a 2s. c o m } } }