R

Ram Sharma • 193.86K Points
Coach

Q. Which of these class contains the methods print() & println()?

  • (A) System
  • (B) System.out
  • (C) BufferedOutputStream
  • (D) PrintStream
  • Correct Answer - Option(D)
  • Views: 138
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.

Related MCQs on JAVA

Q. Which two classes use the Shape class correctly? A. public class Circle implements Shape { private int radius; } B. public abstract class Circle extends Shape { private int radius; } C. public class Circle extends Shape { private int radius; public void draw(); } D. public abstract class Circle implements Shape { private int radius; public void draw(); } E. public class Circle extends Shape { private int radius; public void draw() { /* code here */ } } F. public abstract class Circle implements Shape { private int radius; public void draw() { /* code here */ } }

Q. How do you convert a string to lowercase in Java?

Q. Choose the correct Syntax of FOR loop in Java below.

Q. Where does the system stores parameters and local variables whenever a method is invoked?

Q. What will be the output of the following Java program? class X { int a; double b; } class Y extends X { int c; } class Output { public static void main(String args[]) { X a = new X(); Y b = new Y(); Class obj; obj = b.getClass(); System.out.print(obj.isInstance(a)); } }

Q. BigInteger Class is used to ___.

Q. Which is a one-way communication only between the client and the server and it is not a reliable and there is no confirmation regarding reaching the message to the destination?

Q. Choose the correct way of autoboxing Primitives to Wrapper objects below?

Q. What will be the output of the following Java program? import java.io.*; class Chararrayinput { public static void main(String[] args) { String obj = "abcdefgh"; int length = obj.length(); char c[] = new char[length]; obj.getChars(0, length, c, 0); CharArrayReader input1 = new CharArrayReader(c); CharArrayReader input2 = new CharArrayReader(c, 1, 4); int i; int j; try { while ((i = input1.read()) == (j = input2.read())) { System.out.print((char)i); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }

Q. Which one of the following is not an annotation used by Junit with Junit4?

Learn All JAVA MCQs


Question analytics