Java - Objects and Collections

Java - Objects and Collections
11. /* Missing Statement ? */
public class foo
{
    public static void main(String[]args)throws Exception
    {
        java.io.PrintWriter out = new java.io.PrintWriter();
        new java.io.OutputStreamWriter(System.out,true);
        out.println("Hello");
    }
}

What line of code should replace the missing statement to make this program compile?
  • No statement required.
  • import java.io.*;
  • include java.io.*;
  • import java.io.PrintWriter;
Show Answer
12. What is the numerical range of char?
  • 0 to 32767
  • 0 to 65535
  • -256 to 255
  • -32768 to 32767
Show Answer
13. Which of the following are Java reserved words?

    run
    import
    default
    implement
  • 1 and 2
  • 2 and 3
  • 3 and 4
  • 2 and 4
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test