title: How to create dynamic variables in Java?
body: <p>For example, in <a href="https://haxe.org/" rel="nofollow noreferrer">Haxe</a> I can create strictly typed variables:
  <code>var a:Float = 1.1;</code> or <code>var b:String = "hello"</code> and also dynamic, if needed:</p>
  
  <p><code>var d:Dynamic = true; 
  d = 22; 
  d = "hi";</code></p>
  
  <p>How do I create this kind of variables in Java?</p>