Android 我想为用户选择的每个旋转项分配语句数组

Android 我想为用户选择的每个旋转项分配语句数组,android,arrays,android-intent,Android,Arrays,Android Intent,我用这个代码得到freq的值 Intent intent = getIntent(); Bundle bd = intent.getExtras(); String freq = (String) bd.get("freq"); 试试这个:if(freq.equals(“new”)) But when i use t

我用这个代码得到freq的值

                     Intent intent = getIntent();
                        Bundle bd = intent.getExtras();

                          String freq = (String) bd.get("freq");
试试这个:
if(freq.equals(“new”))

                  But when i use the code below
                 if(freq == "new"),it shows invalid token.
                     {String queue[] = {"Hi","How are you"} 
                      if(freq == "old")
                            String queue[] ={"Hi","How are you","take care"}
                            }
But when i use the code below
                     if(freq.equals("new")),it shows invalid token.
                         {String queue[] = {"Hi","How are you"} 
                          if(freq.equals("old"))
                                String queue[] ={"Hi","How are you","take care"}
                                }