title: I want to see if event is initialized or not but get an error
body: <p>I have 2 classes, 1st being <code>Sprite</code> and 2nd being <code>GameView</code>. I have a <code>onTouchEvent</code> in the GameView class and I want to change the sprites direction and animation upon a touchevent. However, any way I have tried to address the event in the sprite class I get a <code>Variable might not have been initialized</code> so therefor I want to check if the event is initialized - this gives me the same error though!</p>
  
  <p>Sprite class:</p>
  
  <pre><code>    MotionEvent event;  // These three declarations is just to get them in
      int xcoords;        // the scope - not sure it's the right way.
      int ycoords;
  
      if (gameView.onTouchEvent(event, xcoords, ycoords) != null) {  // This
      // gives me the error, specifically on event, xcoords and ycoords.
  
          MotionEvent event = this.gameView.onTouchEvent(event.getPointerCount());
          int isPushedDown = event.getPointerCount();
  
          if (isPushedDown == 0) {
  
              srcX = 1;
              srcY = 3;
  
              Rect srcNoMove = new Rect(srcX, srcY, srcX, srcY);
  
              canvas.drawBitmap(bmp, srcNoMove, dst, null);
  
          }
  
      }
  </code></pre>
  
  <p>GameView event:</p>
  
  <pre><code>public boolean onTouchEvent(MotionEvent event, float xcoord, float ycoord) {
          if (System.currentTimeMillis() - lastClick &gt; 500) {
              lastClick = System.currentTimeMillis();
      }
  
      xcoord = event.getX();
      ycoord = event.getY();
  
      return onTouchEvent(event, xcoord, ycoord);
  
  }
  </code></pre>
  
  <p>How do I address this problem? 
  Declaring the variables above with <code>null</code>, and 2 times <code>= 0;</code> gives the problem that a Boolean cant be null and doing <code>if (!gameView.onTouchEvent(event)) {</code> would that not just return the null I stated above?</p>
  
  <p>I want to check if the variable is initiated and if it is, do something.</p>