adplus-dvertising
frame-decoration

Question

What is the output of this program?
    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

Posted under Java Programming

Answer: (b).false

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?