title: How to make a variable choose if one of the two options is not null
body: <p>In other languages I know I can do the following. But I am having trouble in Java understanding why I cannot do this. My error is:</p>
  
  <pre>
  Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
      The operator || is undefined for the argument type(s) java.lang.String, java.lang.String
  </pre>
  
  <p>My code is:</p>
  
  <pre><code>public class Tester {
  
      public static void main(String[] args)
      {
          String one = null;
          String two = "two";
          String three = one || two;
  
          System.out.println(three);
      }
  
  }
  </code></pre>