title: Instantiate a Scala class from Java, and use the default parameters of the constructor
body: <p>I have a <strong>Scala</strong> class:</p>
  
  <pre><code>class Foo(val x:String = "default X", val y:String = "default Y" ) 
  </code></pre>
  
  <p>I want to call it from <strong>Java</strong>, but using the default parameters </p>
  
  <p>Passing <code>null</code> doesn't work (it assigns <code>null</code>, as expected) </p>
  
  <pre><code>new Foo(null,null); //both are instantiated as null
  </code></pre>
  
  <p>This trick did work for me, but it's ugly, and I wonder if there is a better way:</p>
  
  <p><strong>Scala</strong></p>
  
  <pre><code>class Foo(val x:String = "default X", val y:String = "default Y" ) {
    def this(x:Object) = this()
  }
  </code></pre>
  
  <p><strong>Java</strong></p>
  
  <pre><code>new Foo(null); //no matter what I pass it should work
  </code></pre>
  
  <p>However I would like to get rid of the constructor overload trick, and use a 0 param constructor </p>
  
  <p>Is that possible?</p>