<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Greet</span> </span>{
    <span class="hljs-function"><span class="hljs-keyword">public</span> Either&lt;Integer, String&gt; <span class="hljs-title">f</span><span class="hljs-params">(<span class="hljs-keyword">int</span> val)</span> </span>{
        <span class="hljs-keyword">new</span> Type();
        <span class="hljs-keyword">if</span> (val) {
            <span class="hljs-keyword">return</span> getType();
        } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (!val) {
            <span class="hljs-keyword">throw</span> getError();
        }
    }
}
