Here you can find the source of getDoubleOrNull(ResultSet rs, String columnName)
public static Double getDoubleOrNull(ResultSet rs, String columnName) throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.ResultSet; import java.sql.SQLException; public class Main { public static Double getDoubleOrNull(ResultSet rs, String columnName) throws SQLException { double sVal = rs.getDouble(columnName); if (rs.wasNull()) { return null; }// w w w .j a v a 2 s .c om return new Double(sVal); } }