i want to put another string as the key of the lastEntry of the Hash map.
after check the value of the lastEntry and change it i couldnt use setKey or another func to change the key i want to change the lastEntry.
EditText name; // put that as the key
Map<String,Integer> Names = new HashMap<String,Integer>(10);
// .
// .
// .
name = (EditText) findViewById(R.id.namep);
my func that check the value of the lastEntry and change it:
boolean flagScore = false;
Entry<String, Integer> lastEntry = Names.lastEntry();
if(lastEntry.getValue() < score){
lastEntry.setValue(score);
flagScore = true;
}
if(flagScore){
// put name.getText().toString as key
}