Here you can find the source of toString(SQLWarning warnings)
public static String toString(SQLWarning warnings)
//package com.java2s; //License from project: Apache License import java.sql.SQLWarning; import java.util.Arrays; public class Main { public static String toString(SQLWarning warnings) { if (warnings == null) { return null; }//ww w . ja v a 2 s .com StringBuilder sb = new StringBuilder(); for (Throwable t : warnings) { sb.append("SQL Exception [" + t + "] "); } return sb.toString(); } public static String toString(Object[] objects) { if (objects == null) { return null; } return Arrays.asList(objects).toString(); } }