Is it possible to instantiate objects without constructor in Java : <p>When learning about String literals vs String objects, I came across the fact that there are 2 possible ways to instantiate a variable of type String</p>

<pre><code>//Using literals
String s1 = "text";

//Using constructor
String s2 = new String("text");
</code></pre>

<p>I was wondering if it is possible to somehow create an class and instead of instantiating it with a constructor, one could instantiate it using a literal</p>

<p>This is what I mean</p>

<pre><code>class Value {
    int value;
    //Some methods
}

Value val = 10; //Program automatically sets val.value = 10
</code></pre>
