Find the output of the following:-
String s = "7";
int t = Integer.parseInt(s);
t = t + 1000;
System.out.println(t);
Answers
Answered by
5
Answer:
1007
Explanation:
if the string wasnt parsed as an integer on the second line the answer wouldve been s1000 but it was parsed as an integer so it is simple maths!
Similar questions
English,
4 months ago
English,
4 months ago
History,
4 months ago
Science,
9 months ago
Social Sciences,
9 months ago
Social Sciences,
1 year ago
Social Sciences,
1 year ago
Geography,
1 year ago