What will be the output of the following code? public class Demo { public…
PYQ RPSC Programmer 2024
What will be the output of the following code? public class Demo { public static void main(String[] args) { String str = "Hello"; str = str + "World"; str = str.substring(5,10); System.out.println(str); } }
- A.
Hello
- B.
Hello World
- C.
ello
- D.
World
- E.
Question not attempted
Attempted by 277 students.
Sign up free to check your answer
Sign up freeLoading lesson…

