Java tutorial
//package com.java2s; import java.util.Locale; import java.util.UUID; public class Main { /** * Constructs a key string from the received deviceId and the appId * * @param deviceId * @param appId * @return key */ public static String getKey(String deviceId, UUID appId) { String appIdStr = appId.toString().replace("-", ""); return deviceId + "_" + appIdStr.toUpperCase(Locale.ENGLISH); } }