What is the output of this program?
1.class Output {
2.public static void main(String args[]) {
3.double x = 3.1;
4.double y = 4.5;
5.double z = Math.max( x, y );
6.System.out.print(z);
7.}
8.}
Which of these is a super class of wrappers Double & Integer?
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.A obj2 = new A();
14.System.out.print(obj1.equals(obj2));
15.}
16.}
Which of these class is used to encapsulate IP address and DNS?
Which of these class object has architecture similar to that of array?
Which of these statements are incorrect?
Which of these keyword can be used in subclass to call the constructor of superclass?
What is the output of this program?
1.class String_demo {
2.public static void main(String args[])
3.{
4.int ascii[] = { 65, 66, 67, 68};
5.String s = new String(ascii, 1, 3);
6.ystem.out.println(s);
7.}
8.}
Which of these method is used to find a URL from the cache of httpd?
What is the output of this program?
1.class output {
2.public static void main(String args[])
3. { String s = "Hello World";
4.int i = s.indexOf('o');
5.int j = s.lastIndexOf('l');
6. System.out.print(i + " " + j);
7.}
8.}
Which of these method of httpd class is used to get report on each hit to HTTP server?
Which of the following package stores all the simple data types in java?
What is the output of this program?
1.import java.util.*;
2.class Bitset {
3.public static void main(String args[]) {
4.BitSet obj = new BitSet(5);
5.for (int i = 0; i < 5; ++i)
6.obj.set(i);
7.obj.clear(2);
8.System.out.print(obj);
9.}
10.}
-
-
-
-
Which of these method of String class can be used to test to strings for equality?
Which of these method is used to remove all keys/values pair from the invoking map?
Which of the following is method of wrapper Integer for converting the value of an object into int?
Which of these operators can be used to concatenate two or more String objects?
Which of these method of httpd class is used to get report on each hit to HTTP server?
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.class output {
2.public static void main(String args[])
3.{
4.String chars[] = {"a", "b", "c", "a", "c"};
5.for (int i = 0; i < chars.length; ++i)
6.for (int j = i + 1; j < chars.length; ++j)
7.if(chars[i].compareTo(chars[j]) == 0)
8.System.out.print(chars[j]);
9.}
10.}
Which of the following package stores all the standard java classes?
Which of these methods is used to check for infinitely large and small values?
Which of these process occur automatically by java run time system?
Which of these methods is used to add elements in vector at specific location?
Which of these method of class String is used to remove leading and trailing whitespaces?
What is the output of this program? 1.class array_output {
2.public static void main(String args[])
3.{
4.char array_variable [] = new char[10];
5.for (int i = 0; i < 10; ++i) {
6.array_variable[i] = 'i';
7.System.out.print(array_variable[i] + "" );
8.i++;
9.}
10.}
11.}
Which of these classes implements Set interface?
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.StringBuffer s2 = s1.reverse();
6.System.out.println(s2);
7.}
8.}
Which of the following statements are incorrect?
Which of these method of DatagramPacket is used to obtain the byte array of data contained in a datagram?
Which of these method of HashSet class is used to add elements to its object?
Which of these interface abstractes the output of messages from httpd?
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.System.out.print(Arrays.binarySearch(9.array, 4));
10.}
11.}
In below code, what can directly access and change the value of the variable name?
1.package test;
2.class Target
3.{
4.public String name = "hello";
5.}
Which of these statements are incorrect?
What is the output of this program?
1.class array_output {
2.public static void main(String args[])
3.{
4.int array_variable [] = new int[10];
5.for (int i = 0; i < 10; ++i) {
6.array_variable[i] = i/2;
7.array_variable[i]++;
8.System.out.print(array_variable[i] + " ");
9. i++;
10.}
11.}
12.}
Which of these method of class String is used to extract more than one character at a time a String object?
What is the output of this program? 1.class Output {
2.public static void main(String args[])
3.{
4.Object obj = new Object();
5.System.out.print(obj.getclass());
6.}
7.}
Which of these is wrapper for simple data type char?
Which of these data member of HttpResponse class is used to store the response from a http server?