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.class jump_statments {
2.public static void main(String args[])
3.{
4.int x = 2;
5.int y = 0;
6.for ( ; y < 10; ++y) {
7.if (y % x == 0)
8.continue;
9.else if (y == 8)
10.break;
11.else
12.System.out.print(y + " ");
13.}
14.}
15.}
Which of these method of class String is used to check weather a given object starts with a particular string literal?
Which one is a valid declaration of a boolean?
Which of these is a standard for communicating multimedia content over email?
Which of these tranfer protocol must be used so that URL can be accessed by URLConnection class object?
Which of these tranfer protocol must be used so that URL can be accessed by URLConnection class object?
Which of these is a mechanism for naming and visibility control of a class and its content?
Which of these coding types is used for data type characters in Java?
What is the output of this program?
1.class overload {
2.int x;
3.int y;
4.void add(int a) {
5.x = a + 1;
6.}
7.void add(int a, int b){
8.x = a + 2;
9.}
10.}
11.class Overload_methods {
12.public static void main(String args[])
13.{
14.overload obj = new overload();
15.int a = 0;
16.obj.add(6);
17.System.out.println(obj.x);
18.}
19.}
Which of these class is superclass of String and StringBuffer class?
What is the output of this program?
1.class conversion {
2.public static void main(String args[])
3.{
4.double a = 295.04;
5.int b = 300;
6.byte c = (byte) a;
7.byte d = (byte) b;
8.System.out.println(c + " " + d);
9.}
10.}
What will s2 contain after following lines of code?
String s1 = “one”;
String s2 = s1.concat(“two”)
Which of these class is used to create an object whose character sequence is mutable?
Which of these statements are incorrect?
What is the output of this program? 1.class mainclass {
2.public static void main(String args[])
3.{
5.char a = 'A';
5.a++;
6.System.out.print((int)a);
7.}
8.}
Which of these can not be used for a variable name in Java?
What is the output of this program?
1.class box {
2.int width;
3.int height;
4.int length;
5.}
6.class mainclass {
7.public static void main(String args[])
8.{
9.box obj = new box();
10.System.out.println(obj);
11.}
12.}
Which of these data member of HttpResponse class is used to store the response from a http server?
What is the output of this program?
1.class string_class {
2.public static void main(String args[])
3.{
4.String obj = "I LIKE JAVA";
5.System.out.println(obj.length());
6.}
7.}
What is the output of this program?
1.class leftshift_operator {
2.public static void main(String args[])
3.{
4.byte x = 64;
5.int i;
6. byte y;
7.i = x << 2;
8.y = (byte) (x << 2)
9.System.out.print(i + " " + y);
10.}
11.}
Which of these method of class String is used to extract more than one character at a time a String object?
Which of these is a method of class Date which is used to search weather object contains a date before the specified date?
What is the output of this program?
1.import java.io.*;
2.class files {
3.public static void main(String args[]) {
4.File obj = new File("/java/system");
5.System.out.print(obj.canWrite());
6.System.out.print(" " + obj.canRead());
7.}
8.} Note: file is made in c drive.
Which of these can not be used for a variable name in Java?
What is the output of this program?
1.import java.util.*;
2.class stack {
3.public static void main(String args[]) {
4.Stack obj = new Stack();
5.obj.push(new Integer(3));
6.obj.push(new Integer(2));
7.obj.pop();
8.obj.push(new Integer(5));
9.System.out.println(obj);
10.}
11.}
An expression involving byte, int, and literal numbers is promoted to which of these?
Which of these method of InputStream is used to read integer representation of next available byte input?
Which of these is an incorrect Statement?
Which of these is correct way of calling a constructor having no parameters, of superclass A by subclass B?
What is the output of this program?
1.class operators {
2.public static void main(String args[])
3.{
4.int var1 = 5;
5.int var2 = 6;
6.int var3;
7.var3 = ++ var2 * var1 / var2 + var2;
8.System.out.print(var3);
9.}
10.}
Which of these process occur automatically by java run time system?
Which of these packages contain classes and interfaces used for input & output operations of a program?
What is the output of this program?
1.package pkg;
2.class output {
3.public static void main(String args[])
4.{
5.StringBuffer s1 = new StringBuffer("Hello World");
6.s1.insert(6 , "Good ");
7.System.out.println(s1);
8.}
9.}
Which of these keywords is used to define interfaces in Java?
What is the output of this program? 1.class Output {
2.public static void main(String args[])
3.{
4.boolean a = true;
5.boolean b = false;
6.boolean c = a ^ b;
7.System.out.println(!c);
8.}
9.}
Which of these methods of httpd class is used to read data from the stream?
Which of these methods is used to add elements in vector at specific location?
What is the prototype of the default constructor of this class? public class prototype { }
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);