How to save decimal numbers that add up in savedPreferences? : The time i dealt with whole numbers (1,2,3,4...) i was able to save the scores using the following code in java:

    pointsAmount = pointsAmount +10;
        pointsAvailable.setText("C."+pointsAmount);
        SharedPreferences saveCoins = this.getSharedPreferences("mySaverCoins", Context.MODE_PRIVATE);
        saveCoins.edit().putInt("C.",pointsAmount).commit();

I can add 10 points and they add up and save in Saved Preferences, even if i close and open app again my points are always there with this code.

Now i want the `pointsAmount` to be a decimal number `+0.05`. Using the same code with above is not permitting, it is giving me errors. So I used the following code to save coins with decimal numbers. Now the error is, My Coins disappear when i close and reopen the app again:

    pointsAmount = (pointsAmount +0.05);
        pointsAmount .setText("C."+pointsAmount );
        SharedPreferences saveCoins = this.getSharedPreferences("mySaverCoins", Context.MODE_PRIVATE);
        saveCoins.edit().putInt("C.",(int)pointsAmount).apply();
        SharedPreferences.Editor editor= saveCoins.edit();
        editor.putString("mySaverCoins", "mySaverCoins");
        editor.commit();

I want my coins to be saved when i wake up the app after closing it. What is the problem with my code?