Here you can find the source of generateSession()
public static String generateSession()
//package com.java2s; //License from project: Apache License import java.util.UUID; public class Main { public static String generateSession() { // Generate SessionKey UUID uniqueKey = UUID.randomUUID(); String sessionKey = String.valueOf(uniqueKey); return sessionKey; }//from w ww . j a v a 2 s.c om }