Which of these is a process of writing the state of an object to a byte stream?
Which of these methods is an alternative to getChars() that stores the characters in an array of bytes?
Which of these cannot be declared static?
Which of these selection statements test only for equality?
What is the output of this program?
1.import java.util.*;
2.class Linkedlist {
3.public static void main(String args[]) {
4.LinkedList obj = new LinkedList();
5.obj.add("A");
6.obj.add("B");
7.obj.add("C");
8.obj.removeFirst();
9.System.out.println(obj);
10.}
11. }
What is the output of this program?
1.class output {
2.public static void main(String args[])
3.{
4.StringBuffer s1 = new StringBuffer("Hello World");
5.s1.insert(6 , "Good ");
6.System.out.println(s1);
7.}
8.}
What is the value stored in x in following lines of code?
int x, y, z;
x = 0;
y = 1;
x = y = z = 8;
Which of these is the interface of legacy?
What is the return type of Constructors?
Which of these class is used to access actual bits or content information of a URL?
What is the output of this program?
1.import java.util.*;
2.class Maps {
3..public static void main(String args[]) { 4.HashMap obj = new HashMap();
5.obj.put("A", new Integer(1));
6.obj.put("B", new Integer(2));
7.obj.put("C", new Integer(3));
8.System.out.println(obj);
9.}
10.}
Which of these is method for testing whether the specified element is a file or a directory?
Which of these is an on correct statement?
Which of these is correct about passing an argument by call-by-value process?
A class member declared protected becomes member of subclass of which type?
Which of these methods can be used to convert all characters in a String into a character array?
Which of these class have only one field ‘TYPE’?
Which of these method of InputStream is used to read integer representation of next available byte input?
Which of these class is used to read and write bytes in a file?
Which of these methods is used to obtain value of invoking object as a long?
Which of these operators can be used to concatenate two or more String objects?
Which of these is long data type literal?
Which of these methods is an alternative to getChars() that stores the characters in an array of bytes?
Which of these classes is not included in java.lang?
Which of these is an incorrect array declaration?
What is the output of this program?
1.class output {
2.public static void main(String args[])
3. {
4.char ch;
5.ch = "hello".charAt(1);
6.System.out.println(ch);
7.}
8.}
What is the output of this program?
1.class access{
2.public int x;
3.private int y;
4.void cal(int a, int b){
5.x = a + 1;
6.y = b;
7.}
8.void print() {
9.system.out.println(" " + y);
10.}
11.}
12.class access_specifier {
13.public static void main(String args[])
14.{
15.access obj = new access();
16.obj.cal(2, 3);
17.System.out.println(obj.x);
18.obj.print();
19.}
20.}
What is the output of this program?
1.class Alligator
2.{
3.public static void main(String[] args)
4.{
5.int []x[] = {{1,2}, {3,4,5}, {6,7,8,9}};
6.int [][]y = x;
7.System.out.println(y[2][1]);
8.}
9.}
What is the output of this program?
1.class area {
2.int width;
3.int length;
4.int volume;
5.area() {
6.width=5;
7.length=6;
8.}
9.void volume() {
1o.volumewidth*length*height;
11.}
12.}
13.class cons_method {
14.public static void main(String args[])
15.{
16.area obj = new area();
17.obj.volume();
18.System.out.println(obj.volume);
19.}
20}
What is the output of the following code?
1.class San
2.{
3.public void m1 (int i,float f)
4.{
5.System.out.println(" int float method");
6.}
7.public void m1(float f,int i);
8.{
9.System.out.println("float int method");
10.}
11.public static void main(String[]args)
12.{
13.San s=new San();
14.s.m1(20,20);
15.}
16.}
What is the output of this program?
1.import java.util.*;
2.class Maps {
3. public static void main(String args[]) {
4.HashMap obj = new HashMap(); 5.obj.put("A", new Integer(1));
6.obj.put("B", new Integer(2));
7.obj.put("C", new Integer(3)); 8.System.out.println(obj.keySet());
9.}
10.}
Which of these method of String class can be used to test to strings for equality?
What will s2 contain after following lines of code?
StringBuffer s1 = “one”;
StringBuffer s2 = s1.append(“two”)
What is the output of this program?
1.class box {
2.int width;
3.int height;
4.int length;
5.int volume;
6.void volume(int height, int length, int width) {
7.volume = width*height*length;
8.}
9.}
10.class Prameterized_method{
11.public static void main(String args[])
12.{
13.box obj = new box();
14.obj.height = 1;
15.obj.length = 5;
16.obj.width = 5;
17.obj.volume(3,2,1);
18.System.out.println(obj.volume);
19.}
20.}
What is the output of this program?
1.class test {
2.int a;
3.int b;
4.test(int i, int j) {
5.a = i;
6.b = j;
7.}
8.void meth(test o) {
9.o.a *= 2;
10.O.b /= 2;
11.}
12.}
13.class Output {
14.public static void main(String args[])
15.{
16.test obj = new test(10 , 20);
17.obj.meth(obj); 18.System.out.println(obj.a + " " + obj.b); }
19.}
What is the output of this program?
1.import java.util.*;
2.class hashtable {
3.public static void main(String args[]) {
4.Hashtable obj = new Hashtable();
5.obj.put("A", new Integer(3));
6.obj.put("B", new Integer(2));
7.obj.put("C", new Integer(8));
8.System.out.print(obj.toString());
9.}
10.}
What will be the output of these statement? 1.class output {
2.public static void 3.main(String args[])
4.{
5.double a, b,c;
6.a = 3.0/0;
7.b = 0/4.0;
8.c=0/0.0;
9.System.out.println(a);
10.System.out.println(b);
11.System.out.println(c);
12.}
13.}
What is the output of this program?
1.class A {
2.int i;
3.int j;
4.A() {
5.i = 1;
6.j = 2;
7.}
8.}
9.class Output {
10.public static void main(String args[])
11.{
12.A obj1 = new A();
13.System.out.print(obj1.toString());
14.}
15.}
Which of the following is method of wrapper Integer for converting the value of an object into int?
What is the output of this program?
1.class string_class {
2.public static void main(String args[])
3.{
4.String obj = "hello";
5.String obj1 = "world";
6.String obj2 = "hello";
7.System.out.println(obj.equals(obj1) + " " + obj.equals(obj2));
8.}
9.}