πŸ“Š JAVA
Q. What will be the output of the following Java program?
Code:
class output 
{
    public static void main(String args[])
    {
       String s1 = "Hello World";
       String s2 = s1.substring(0 , 4);
       System.out.println(s2);
    }
}
  • (A) Hell
  • (B) Hello
  • (C) Worl
  • (D) World
πŸ’¬ Discuss
βœ… Correct Answer: (A) Hell

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
81
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rakesh Kumar
Publisher
πŸ“ˆ
96%
Success Rate