if(context.getClass()。getSimpleName())不起作用

时间:2015-03-30 15:00:18

标签: java android

textView.setText(context.getClass().getSimpleName());

为什么此代码有效并设置 textView “App”,但如果

 if(context.getClass().getSimpleName() == "App") {
           holder.textView.setTextColor(Color.RED);
       }

它不起作用。 为什么不呢?抱歉愚蠢。我是新来的

0 个答案:

没有答案