Java Server pages(JSP) embeds in
What are the access specifiers that can be used for interface in java.
Which of these Java interfaces define a method actionPerformed()
?
Which concept of Java is achieved by combining methods and attributes into a class?
class test{
public static void main (String[] args) {
String s1=new String("Hello");
String s2="Hello";
System.out.println((s1==s2)+" "+(s1.equals(s2)));
}
}
Which of the following can cause a memory leak?
public class outputs
{
public static void main(String args[])
{
int a=10;
int b=20;
int c=30;
int sum=0;
sum= a++ + b++ + b*c++ + a*c++ ;
System.out.println(++sum);
}
}
Which of the following are valid calls to Math.max?
What is the output of the following code?
class Test
{
public static void main(String args[])
{
char chars[] = {'a', 'b', 'c'};
String s = new String(chars);
String s1 = "abcd";
int len1 = s1.length();
int len2 = s.length();
System.out.println(len1 + " " + len2);
}
}
import java.util.*;
class output
{
public static void main(String args[])
{
LinkedList obj = new LinkedList();
obj.add("A");
obj.add("B");
obj.add("C");
obj.removeFirst();
System.out.println(obj);
}
}