Logo

Java Questions Set 187:

Quiz Mode

 Static methods can not refer to this or super in any way 

1
2

Solution:

 

' \b ' is used to


1
2
3
4

Solution:

  Which of these packages contains abstract keyword 

1
2
3
4

Solution:

 When does method overloading is determined? 

1
2
3
4

Solution:

Which class is the superclass of the String and StringBuffer classes?

1
2
3
4

Solution:

class test {

public static void main (String[] args) {

byte b = 100; 

        b *= 100; 

        System.out.println(b); 

}

}

1
2
3
4

Solution:

Which cause a compiler error?

1
2
3
4

Solution:

what should be the output of this code block?

public class abekus

{

public static void main(String[] args) {

  String input = " abekus . com ";

  input = input.trim();

  System.out.println(input.length());

}

}

1
2
3
4

Solution:

Which polymorphism feature is related to parent and child class relationships in Java?

1
2
3
4
5

Solution:

What will be the output of the following Java program?


import java.io.*; class Chararrayinput { public static void main(String[] args) { String obj = "abcdef"; int length = obj.length(); char c[] = new char[length]; obj.getChars(0, 3, c, 0); CharArrayReader input2 = new CharArrayReader(c, 0, 3); int i; try { while ((i = input2.read()) != -1) { System.out.print((char)i); } } catch (IOException e) { e.printStackTrace(); } } }

1
2
3
4

Solution: