________() method is used to concatenate two strings.
Which Java class is used to read and write bytes in a file?
Which of these processes occur automatically by the Java runtime system?
Which of these methods return localized description of an exception?
What is a marker interface?
Which of the following is used to read objects from a stream?
How many copies of static and instance variables are created when 10 objects are created of a class?
what should be the output of this code block?
public class abekus {
public static void main(String[] args) {
int a = 5;
a += 5;
switch (a) {
case 5:
System.out.print("5");
break;
case 10:
if (a % 2 == 0)
System.out.print("even");
else
System.out.print("odd");
break;
default:
System.out.print("0-2");
}
}
}
What is the output of the following program?
class A
{
public static void main(String args[])
{
boolean a = true;
boolean b = false;
boolean c = a | b;
boolean d = a & b;
System.out.println(c + " " + d);
}
}
What will be the output of the following Java program?
import java.io.*;
class CharArrayInput
{
public static void main(String[] args)
{
String obj = "abcdefgh";
int length = obj.length();
char c[] = new char[length];
obj.getChars(0, length, c, 0);
CharArrayReader input1 = new CharArrayReader(c);
CharArrayReader input2 = new CharArrayReader(c, 1, 4);
int i;
int j;
try
{
while ((i = input1.read()) == (j = input2.read()))
{
System.out.print((char)i);
}
}
catch (IOException e)
{
e.printStackTrace();
}
}
}