Here you can find the source of getString(ResultSet rs, String name, String ifnull)
public static String getString(ResultSet rs, String name, String ifnull) throws SQLException
//package com.java2s; /*//from w w w. java 2 s.c om * Copyright (c) Jim Coles (jameskcoles@gmail.com) 2018 through present. * * Licensed under the following license agreement: * * http://www.apache.org/licenses/LICENSE-2.0 * * Also see the LICENSE file in the repository root directory. */ import java.sql.*; public class Main { public static String getString(ResultSet rs, String name, String ifnull) throws SQLException { String val = rs.getString(name); return ((val != null) ? val : ifnull); } }