Here you can find the source of parseMinutes(String minutes, int defaultValue)
public static int parseMinutes(String minutes, int defaultValue)
//package com.java2s; //License from project: Open Source License public class Main { public static int parseMinutes(String minutes, int defaultValue) { try {//from ww w . ja v a2 s . c o m return Integer.parseInt(minutes); } catch (Exception ex) { return defaultValue; } } }