title: Java / Scala - Get emojis from Hexacode
body: <p>Suppose I have a hexa code for an emoji, how can I generate the full emoji from the same. If its a single hexacode I am able to generate is as follows:</p>
  <pre><code>val str1 = &quot;1F471&quot;
  val hex = Integer.parseInt(str1, 16)
  println(new String(Character.toChars(hex)))
  </code></pre>
  <p>his prints . However, if I want to print the full emoji with skin tone given by the second component i.e 1F3FF, what needs to be done?</p>
  <pre><code>val str = &quot;1F471 1F3FF&quot;
  val parts = str.split(&quot; &quot;).map(x =&gt; Integer.parseInt(x, 16))
  println(mergeEmojis(new String(Character.toChars(parts(0))), new String(Character.toChars(parts(1))))) 
  // how can mergeEmojis() be implemented?
  </code></pre>