A
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);
}
}
{
public static void main(String args[])
{
String c = "Hello i love java";
boolean var;
var = c.startsWith("hello");
System.out.println(var);
}
}
- Correct Answer - Option(B)
- Views: 11
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.