title: My android studio code built successful but output app crashing
body: <p>Here's my MainActivity's XML file:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      tools:context=&quot;.MainActivity&quot;&gt;
  
      &lt;TextView
          android:id=&quot;@+id/textView&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:text=&quot;Hello World!&quot;
          app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
          app:layout_constraintHorizontal_bias=&quot;0.47&quot;
          app:layout_constraintLeft_toLeftOf=&quot;parent&quot;
          app:layout_constraintRight_toRightOf=&quot;parent&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot;
          app:layout_constraintVertical_bias=&quot;0.877&quot; /&gt;
  
      &lt;ImageView
          android:id=&quot;@+id/imageView&quot;
          android:layout_width=&quot;404dp&quot;
          android:layout_height=&quot;331dp&quot;
          android:layout_marginStart=&quot;3dp&quot;
          android:layout_marginTop=&quot;94dp&quot;
          android:layout_marginEnd=&quot;4dp&quot;
          android:layout_marginBottom=&quot;199dp&quot;
          app:layout_constraintBottom_toTopOf=&quot;@+id/textView&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot;
          tools:ignore=&quot;ImageContrastCheck&quot;
          tools:srcCompat=&quot;@tools:sample/avatars&quot; /&gt;
  
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  <p>And here's the Java file:</p>
  <pre><code>package com.wavedevelopers.myapplication;
  
  import androidx.appcompat.app.AppCompatActivity;
  
  import android.os.Bundle;
  import android.widget.ImageView;
  
  import java.util.Calendar;
  import java.util.Date;
  
  public class MainActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          ImageView imageView;
  
          Calendar cal = Calendar.getInstance();
  
          Date now_date = null;
          cal.setTime(now_date);
  
          imageView = (ImageView)findViewById(R.id.content);
  
          if(cal.get(Calendar.DAY_OF_WEEK) == Calendar.MONDAY)
          {
              imageView.setImageResource(R.drawable.a1);
          }
          else if(cal.get(Calendar.DAY_OF_WEEK) == Calendar.TUESDAY)
          {
              imageView.setImageResource(R.drawable.a2);
          }
  
      }
  }
  </code></pre>
  <p>The Above code built successfully but out not displaying in the emulator, verify the above code
  next</p>
  <p><strong>NEED CODE CHANGES :</strong></p>
  <p><code>If(cal.get(Calendar.DAY_OF_WEEK) == CALENDAR.MONDAY) </code></p>
  <p>This condition checks the <code>DAY_OF_WEEK</code>, but I want to check both <code>DATE_OF_MONTH</code> and <code>MONTH</code> with the local date.</p>
  <p>Example: If local calender date is equal to given date, display the image</p>