class output { public static void main(String args[]) { String c = "Hello i love java"; boolean var; var = c.startsWith("hello"); System.out.println(var); } }
Options:
A .  true
B .  false
C .  0
D .  1
Answer: Option B
startsWith() method is case sensitive "hello" and "Hello" are treated differently, hence false
is stored in var. Output: $ javac output.java $ java output false
Submit Your Solution hear: