Java tutorial
//package com.java2s; public class Main { public static String normalizeVerseInformation(Integer[] verseInfo) { if (verseInfo == null) { return null; } String result = null; if (verseInfo.length > 0) { result = String.valueOf(verseInfo[0]); } if (verseInfo.length > 1 && verseInfo[1] != verseInfo[0]) { result += "_" + String.valueOf(verseInfo[1]); } return result; } }