import java.util.UUID;
/**
* This class is used to generate UUID and return it as a String object
*
* @author dhanago
*
*/
public class GenerateUUID
{
/**
* method to return UUID as a String object
*
* @return
*/
public static String getUUID()
{
return UUID.randomUUID().toString();
}
}
javawaveblogs-20
Monday, March 9, 2009
Generate a unique identifier with java.util.UUID
Java SE 5 has introduced the java.util.UUID class to easily generate Universally Unique Identifier (UUID)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment