0

Hi so im comparing two strings that visually look the same but for some reason the code is not executing the if statement. both temp day and key are showing as 2022-04-04

                             Results = (HashMap<String, Map<String, Double>>) task.getResult().getValue();
                    for(int y = 0; y < Dates.size(); y++) {
                        for (Map.Entry<String, Map<String, Double>> entry : Results.entrySet()) {
                        key = entry.getKey();
                        value = (HashMap<String, Double>) entry.getValue();
                        String TempDay = Dates.get(0);
                        //makeToast(TempDay);
                            
                        if(key == TempDay){
                            makeToast(key + " " + TempDay);

                          for(Map.Entry<String, Double> entry2: value.entrySet()){
                             String key2 = entry2.getKey();

                             Double value2 = entry2.getValue();
                              Matches.put(key2,value2);


                            }
                         }


                        }
                    }


                }

0 Answers0