功能问题等于 [英] problem in Fonction equals
本文介绍了功能问题等于的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
此功能用于更改Circle c的颜色
但条件if(tc [i] .equals(Clr))为假
tc []是表的颜色
同一个人可以帮助我:)
hello
this function is for change the color the Circle c
but condition if(tc[i].equals(Clr)) is false
tc[] is table the colors
same one can help me :)
public void changeColor(Circle c)
{ int i;
Color Clr=c.getC()
for( i=0;i<8;i++)
{
if(tc[i].equals(Clr)){
c.setC(tc[i+1]);
break;
}
}
}
;
推荐答案
public void changeColor(Circle c)
{ int i;
Color Clr=c.getC()
for( i=0;i<8;i++)
{
if(false == tc[i].equals(Clr)){
c.setC(tc[i+1]);
break;
}
}
}
试试这个;)
代码段来自哪里?
try this ;)
Where is the snippet coming from?
这篇关于功能问题等于的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文