app/src/main/java/com/mohammadKZ/CoronaVirus_COVID19_statistics/HomeActivity.java
private void sharedPreferences() {
        // Retrieving the value using its keys the file name
        // must be same in both saving and retrieving the data
        SharedPreferences sh = getSharedPreferences("start-up", MODE_PRIVATE);

        // The value will be default as empty string because for
        // the very first time when the app is opened, there is nothing to show
        String start_up = sh.getString("start-up", "false");

        // We can then use the data
        if (start_up.equals("false")) {
            StartUp();
        } else if (start_up.equals("true")) {
            start();
        }

    }
//read sharedPreferences (start-up)
read sharedPreferences (start-up)
read sharedPreferences ( start - up )
private void sharedPreferences() {
        SharedPreferences sh = getSharedPreferences("start-up", MODE_PRIVATE);
        String start_up = sh.getString("start-up", "false");
        if (start_up.equals("false")) {
            StartUp();
        } else if (start_up.equals("true")) {
            start();
        }
    }
private void sharedPreferences ( ) { SharedPreferences sh = getSharedPreferences ( "start-up" , MODE_PRIVATE ) ; String start_up = sh . getString ( "start-up" , "false" ) ; if ( start_up . equals ( "false" ) ) { StartUp ( ) ; } else if ( start_up . equals ( "true" ) ) { start ( ) ; } }
read sharedPreferences (start-up)
read sharedPreferences ( start - up )
// Retrieving the value using its keys the file name // must be same in both saving and retrieving the data // The value will be default as empty string because for // the very first time when the app is opened, there is nothing to show // We can then use the data