0
why there is an error
static int removeElement(int[] nums, int val) { String c = "-122"; int b = 9; for (int b = 0;b<122;b++){} } question: why the int b in for block can not coexist with int b in method removeElement why int b in for block can not shadow the int b of the method body.
1 Respuesta
+ 1
Hi! you declare the variable b twice. you can't do that. and why do you need a c variable with a string value inside?