Computer Science, asked by debadyutidey4, 9 months ago

Find the output of the following:-
String s = "7";
int t = Integer.parseInt(s);
t = t + 1000;
System.out.println(t);​

Answers

Answered by EliteDaMyth
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