Java tutorial
//package com.java2s; //License from project: Apache License public class Main { public static char getSmallerDigit(String numStr) { char smallest = '9'; for (char c : numStr.toCharArray()) { if (c < smallest) smallest = c; } return smallest; } }