阅读背景:

即使在将int转换为String之后,Java流也会给出“无法比较的类型:int和String”

来源:互联网 

I have a Java class that squares all the numbers between 0 and a given number. Each squared number is then converted to a string using String.valueOf(number). A given digit is also converted to a String. The squared number and the given digit (both converted to strings) are then passed into a function that is supposed to count the number of times that the digit appears in the squared number as String using a stream. However, when this comparison takes place Java gives me the error: I have a Java class that squares all the number




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: