title: Cannot use HashMap replace method : call require api level 24 (current min is 22):java.util.HashMap#replace
body: <p>So guys, why can't I use the HashMap replace method on my Android Studio project?</p>
  
  <pre><code>private HashMap&lt;Integer, Integer&gt; scoreLine = new HashMap&lt;Integer, Integer&gt;();
  scoreLine.put(0, 22;
  scoreLine.put(1, 46);
  scoreLine.put(2, 89);
  
  scoreLine.replace(1, 49); // I can't use this
  scoreLine.replace(1, 46, 49); // I can't use this either
  </code></pre>
  
  <p>Even though I can use the put method to add item</p>
  
  <p>Here is though my gradle.build (just some part of the code)  </p>
  
  <pre><code>android {
      compileSdkVersion 26
      defaultConfig {
          applicationId "com.example.practiceprojectweekend"
          minSdkVersion 22
          targetSdkVersion 26
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  </code></pre>
  
  <p>As you can see, I did indeed set the current minSdkVersion is 22<br>
  and that replace method require minmum level 24  </p>
  
  <p>I do replace that minSDK to 24<br>
  But then I couldn't not run the app using my Android Device  </p>
  
  <p>Is there a way to get around this without changing the minSdkVersion ?</p>