Java tutorial
//package com.java2s; public class Main { public static String processMoneyFieldByNull(String value) { if (value == null) { return null; } if (value.indexOf(":") > 0) { String[] strs = value.split(":"); if (strs.length > 1 && "null".equals(strs[1])) { return strs[0] + ":-"; } } return value; } }