1. Which methods is not used while Serialization and DeSerialization in java?
|
2. Which methods is used to make raw MIME formatted string?
|
3. What will be the output of the code ________?
import java.util*;
class test
{
public static void main(String args[])
{
ArrayLitt obj = new ArrayList();
obj.add("P");
obj.add("Q");
obj.add("R");
obj.add(1, "S");
System.out.println(obj);
}
}
|
4. What will be the output of the code ________?
import java.util*;
class Output
{
public static void main(String args[])
{
ArrayList obj = new ArrayList();
obj.add("X");
obj.add(0, "Y");
System.out.println(obj.size());
}
}
|
5. What exception is thrown by parseInt() method
|
6. What will be the output of the code ________?
class multithreaded
{
public static void main(String args[])
{
Thread t = Thread.currentThread();
t.setName("New Thread");
System.out.println(t);
}
}
|
7. What will be the output of the code ________?
class multithreaded
{
public static void main(String args[])
{
Thread t = Thread.currentThread();
System.out.println(t.isAlive());
}
}
|
8. What will be the output of the code if the given input is 'abcqfghqbcd'?
class Input_Output
{
public static void main(String args[]) throws IOException
{
char c;
BufferedReader obj = new BufferedReader(new InputStreamReader(System.in));
do
{
c = (char) obj.read();
System.out.print(c);
} while(c != 'q');
}
}
|
9. What will be the output of the code ________?
class output
{
public static void main(String args[])
{
StringBuffer c = new StringBuffer("Hello");
System.out.println(c.length());
}
}
|
10. What will be the output of the code ________?
class output
{
public static void main(String args[])
{
StringBuffer s1 = new StringBuffer("Hello");
StringBuffer s2 = s1.reverse();
System.out.println(s2);
}
}
|