Java tutorial
//package com.java2s; public class Main { public static String getShortName(String name) { return (name.length() > 25) ? name.substring(0, 25) + "..." : name; } }