Can we declare an interface as final?
Which of these is an incorrect array declaration?
Which of these selection statements test only for equality?
Java does not support
What does setAutoCommit(false)
do?
Which Java interface provides the capability to store elements in a collection that guarantees no duplicates and maintains the elements in natural order?
class test {
public static void main (String[] args) {
boolean a=true;
boolean b=!a;
boolean c=b|!a;
boolean d=a&&!b;
boolean e=!d?b:c;
System.out.println(d+" "+c);
}
}
What will be the output of the following Java code?
class Output
{
public static void main(String[] args)
{
String s1 = "Hello I love Java";
String s2 = new String(s1);
System.out.println((s1 == s2) + " " + s1.equals(s2));
}
}
what should be the output of this code block?
public class abekus {
public static void main(String[] args) {
String input = " abekus ";
input = input.trim();
System.out.print(input.length());
input = input + " ";
input = input + " ";
System.out.print(input.length());
}
}
Predict the output of the following Java code:
public class Child extends Parent
{
public static String song()
{
return "sa re";
}
public static void main(String[] args)
{
Child a = new Child();
Parent b = new Child();
System.out.println(a.song() + " " + b.song());
}
}
class Parent
{
public static String song()
{
return "ga ma";
}
}