Array list, Linked list and Vector are __________.
Which of the following method is used to get the length of string?
What will be the output of the following program?
int a , b , c;
a = 1 ;
b = 2 ;
a = b = c = 3 ;
System.out.print(a);
public class j
{
public static void main(String args[])
{
String s1 = new String("Java");
String s2 = new String("HTML");
System.out.println(s1.concat(s2));
}
}
Not a run time exception......
Statement 1- Arithmetic Exception
Statement 2- Arraystore Exception
Statement 3- illigalargument Exception
Statement 4 - AWT Exception
class test{
public static void main (String[] args) {
int x=10,y=15;
if(x++<=10 || ++y>15)
{
x++;
}
else
{
y--;
}
System.out.println(x+" "+y);
}
}
class test{
public static void main (String[] args) {
int x=10;
if(++x<10 && x/0>10)
System.out.println("Hello");
else
System.out.println("Hi");
}
}
What is the output of the following code?
class output
{
public static void main(String args[])
{
String str = "Hello i love java";
boolean var;
var = str.startsWith("hello");
System.out.println(var);
}
}
What will be the output of the following code?
class Out
{
public static void main(String args[])
{
int arr1[] = new int[10];
int arr2[] = {1, 2, 3, 4, 5};
System.out.println(arr1.length + " " + arr2.length);
}
}
What will be the output of the following code?
class A
{
public static void main(String args[])
{
String a = "abekus";
String b = "world";
String c = "abekus";
System.out.println(a.equals(b) + " " + a.equals(c));
}
}