I am trying to compare char to a String but getting an error.
Error
error: incompatible types: unexpected return value
code:
public class MyClass {
public static void main(String args[]) {
String s = Integer.toBinaryString(2432);
String p = "0";
for (char c : s.toCharArray()) {
return p.equals(new String(new char[]{c}));
}
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…