Q. What will be the output of the following Java code?

Code:
class output 
{
    public static void main(String args[])
    { 
       String c = "Hello i love java";
       boolean var;
       var = c.startsWith("hello");
       System.out.println(var);
    }
}
  • (A) true
  • (B) false
  • (C) 0
  • (D) 1
πŸ’¬ Discuss
βœ… Correct Answer: (B) false

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
86
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Neelam Mittal
Publisher
πŸ“ˆ
89%
Success Rate