title: What doess compile time safety and run time safety mean?
body: <br/>
  <p>According to <a href="https://www.baeldung.com/a-guide-to-java-enums" rel="nofollow noreferrer">this post about Java Enum</a>, runtime-safety can achieved by using <code>==</code>operator to compare status and prevent <code>NullPointerException</code>.
  <br/></p>
  <pre><code>if(testPz.getStatus() == Pizza.PizzaStatus.DELIVERED); 
  </code></pre>
  <p>Also for <code>compile-time-safety</code> although logically the comparison was proved false, this issue is avoided by using the <code>==</code> operator.</p>
  <pre><code>if(testPz.getStatus() == TestColor.GREEN);
  </code></pre>
  <p>Can you please tell me what <code>compile-time-safety</code> and <code>runtime-safety</code> are in Java?
  <br/></p>
  <p>If you can please give me a small example.</p>