title: How to check if a given class has a field and it was initialized?
body: <p>How to check if given class has specific field and if it is initialized (has value at the moment)?</p>
  
  <pre><code>abstract class Player extends GameCahracter {
  
  }
  
  public class Monster extends GameCahracter{
  
      public int level = 1;
  }
  abstract class GameCharacter{
  
     public void attack(GameCahracter opponent){
  
           if (opponent instanceof Monster &amp;&amp; ){ // &lt;&lt; here I have to know is it instance of Monster and if it has initialized value
             }
  }
  </code></pre>