Java tutorial
//package com.java2s; public class Main { private static int start = 0; public static String generateCommentID(String title, String date) { start++; StringBuffer result = new StringBuffer(); result.append(title).append(date).append(start); return result.toString(); } }