我正在尝试将一些C++代码写入java,现在我已经将下面的代码写入到java中,但它引发错误!试图将一堆C++代码转换为Java - 如果语句
if(ShapeNotFound && xd*yd - nPixel[k] < xd+yd) // Condition for RECTANGLE
{
System.out.print("\n "+in+" \t Rectangle \n");
fileWriter3.write("\n "+in+" \t Rectangle \n");
Shape[k] = 2;
ShapeNotFound = 0;
}
我收到以下错误:
The operator && is undefined for the argument type(s) int, boolean
请帮帮忙,告诉我怎么写上面,如果条件正确的Java