+ 1
write a statement to convert 1002 into int
Anybody help me with this?
11 Respostas
+ 1
I didn't understand what you are trying to say, can you show me your code and a proper explanation of whats going wrong
Please
+ 1
But 1002 is already an integer, can u just copy/paste the question and show it to me?
+ 1
I guess the 1002 is wrapped in double quotes like this "1002" is it?
+ 1
I guess the 1002 is wrapped in double quotes like this "1002" is it?
+ 1
Then it's easy:
String number = "1002";
int result = Integer.parseInt(number); System.out.println(result);
+ 1
No problem đ€đ€đ€đ€ and I wish you luck in your programming and life đđ
0
Here...they have asked us to write a java programme to convert 1002 into integer...in first place, im not sure what it even means..
0
And that is actually my confusion
0
The question which I asked is the complete one...
0
Oh yesss..sorry, forgot that in the question
0
Thank you so much ! I just..got to know the diff btw double and single quotes...:) thanx again