Introduction
Here is the source code for Main.java
Source
//package com.java2s;
public class Main {
public static String shortString(String str, int length) {
if (str.length() < length + 2)
return str;
else
return str.substring(0, length) + "..";
}
}