Which of these is wrapper around everything associated with a reply from an http server?
What is the output of this program?
1.import java.util.*;
2.class Output {
3.public static void main(String args[]) {
4.ArrayList obj = new ArrayList();
5.obj.add("A");
6.obj.ensureCapacity(3); 7.System.out.println(obj.size());
8.}
9.}
Which of these method is used add an element and corresponding key to a map?
Which of these data type is returned by every method of OutputStream?
What is the output of this program?
1.import java.util.*;
2.class Array {
3.public static void main(String args[]) {
4.int array[] = new int [5];
5.for (int i = 5; i > 0; i--)
6.array[5 - i] = i;
7.Arrays.sort(array);
8.for (int i = 0; i < 5; ++i)
9.System.out.print(array[i]);;
10.}
11.}
Which of these class is used to read and write bytes in a file?
Which of these interface abstractes the output of messages from httpd?
Which of these exception is thrown by URL class’s constructors?
Which of these is a bundle of information passed between machines?
Which of these classes is used for input and output operation when working with bytes?
Which of these keywords is used to make a class?
Which of these is supported by method overriding in Java?
In the below code, which code fragment should be inserted at line 3 so that the output will be: “123abc 123abc”?
1.StringBuilder sb1 = new StringBuilder("123");
2.String s1 = "123";
3.// insert code here
4.System.out.println(sb1 + " " + s1);
What is the output of this program?
1.class Output {
2.public static void main(String args[]) {
3.Long i = new Long(256);
4.System.out.print(i.hashCode());
5.}
6.}
Which of these method of class StringBuffer is used to extract a substring from a String object?
What is the output of this program?
1.class output {
2.public static void main(String args[])
3. {
4.StringBuffer c = new StringBuffer("Hello");
5.StringBuffer c1 = new StringBuffer(" World");
6.c.append(c1);
7.System.out.println(c);
8.}
9. }
Which of the following loops will execute the body of loop even when condition controlling the loop is initially false?
Which of these class is used for operating on request from the client to the server?
What is the output of this program?
1.class output {
2.public static void main(String args[])
3.{
4.StringBuffer s1 = new StringBuffer("Hello");
5.s1.setCharAt(1,'x');
6.System.out.println(s1);
7.}
8.}
What is the output of this program?
1.class Output {
2.public static void main(String args[]) {
3.Integer i = new Integer(257);
4.float x = i.floatValue();
5.System.out.print(x);
6.}
7.}
Which of the following statements is correct?
What is the string contained in s after following lines of code?
StringBuffer s new StringBuffer(“Hello”);
s.deleteCharAt(0);
What is the output of this program?
1.import java.io.*;
2.class filesinputoutput {
3.public static void main(String args[]) {
4.InputStream obj = new FileInputStream("inputoutput.java"); 5.System.out.print(obj.available());
6.}
7.}
Note: inputoutput.java is stored in the disk.
What is the output of this program?
1.class output {
2.public static void main(String args[])
3.{
4.String s1 = "one";
5.String s2 = s1 + " two";
6.System.out.println(s2);
7.}
8.}
What is the output of this program?
1.class A {
2.public int i;
3.protected int j;
4.}
5.class B extends A {
6.int j;
7.void display() {
8.super.j = 3;
9.System.out.println(i + " " + j);
10.}
11.}
12.class Output {
13.public static void main(String args[])
14.{
15. B obj = new B();
16.obj.i=1;
17.obj.j=2;
18.obj.display();
19.}
20.}
What is the output of this program?
1.class static_out {
2.static int x;
3.static int y;
4.void add(int a , int b){
5.x = a + b;
6.y = x + b;
7.}
8.}
9.class static_use {
10.public static void main(String args[])
11.{
12.static_out obj1 = new static_out();
13.static_out obj2 = new static_out();
14.int a = 2;
15.obj1.add(a, a + 1);
16.obj2.add(5, a);
17.System.out.println(obj1.x + " " + obj2.y);
18.}
19.}
Which of these is used to access member of class before object of that class is created?
Which of these packages contain classes and interfaces used for input & output operations of a program?
Which of these are selection statements in Java?
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 access{
2.public int x;
3.static int y;
4.void cal(int a, int b){
5.x += a ;
6.y += b;
7.}
8.}
9.class static_specifier {
10.public static void main(String args[])
11.{
12.access obj1 = new access();
13.access obj2 = new access();
14.obj1.x = 0;
15.obj1.y = 0;
16.obj1.cal(1, 2);
17.obj2.x = 0;
18.obj2.cal(2, 3);
19.System.out.println(obj1.x + " " + obj2.y);
20.}
21.}
Which of the following are legal lines of Java code? 1. int w = (int)888.8; 2.byte x = (byte)100L; 3.long y = (byte)100; 4.byte z = (byte)100L;
Which of these method is called when http daemon is acting like a normal web server?
Which of these standard collection classes implements a linked list data structure?
Which of these method is used to change an element in a LinkedList Object
What is the output of this program?
1.class output {
2.public static void main(String args[])
3.{
4.String s1 = "one";
5.String s2 = s1 + " two";
6.System.out.println(s2);
7.}
8.}
Which of the following is a method having same name as that of its class?
Which of these is the interface of legacy is implemented by Hashtable and Dictionary classes?
Which of these method of class String is used to remove leading and trailing whitespaces?
Which of these is correct way of calling a constructor having no parameters, of superclass A by subclass B?