Java tutorial
//package com.java2s; public class Main { public static String numToK(String num) { StringBuilder sb = new StringBuilder(); if (num.length() >= 5) { sb.append(num.substring(0, 2)).append("k"); return sb.toString(); } else { return num; } } }