+ 3
simple yet a slight twist..help here out?
Int y=7, sum=0; Sum=sum+y; Y=y+2; What is Y equal to?
5 Respuestas
+ 4
9
Where is the twist? Or is sum being a distraction the twist?
+ 4
I think the twist is that Y is in caps. So the answer is error! 😜
+ 4
int y=7,sum=0; //"int" bcz java is case sensitive , so "Int" will not work
sum=sum+y; //bcz Sum is not defined , so u can use "sum"
int Y=y+2; //u need to define Y first then provide it a value
/*
Y will be 9 , if above corrections were made ,
else output will be error
*/
+ 3
@Restoring Ahhh, I wonder if that's it or simply because they're typing with their phone (stupid auto caps)? If that's the twist, then I could see that. I just assumed it was poor typing because English is their second language or because many people are on cell phones so it automatically capitalizes first letter of each sentence, which appears to be the case since Int is also capitalized.
0
Sum is not defined