• Home
  • Ask a Question
  • About
  • Contact
  • Advertise
  • Sitemap
MENU

Ad Java MCQ

Java | Advance Java | Multiple Choice | Questions and Answers | Test Bank

  • Home
  • Translate

True or false? An object of a class that implements an interface may be thought of as an object of that interface type.

Add Comment

True or false? An object of a class that implements an interface may be thought of as an object of that interface type.



Answer: True

True or false? If a superclass declares an abstract method, a subclass must implement that method.

Add Comment

True or false? If a superclass declares an abstract method, a subclass must implement that method.



Answer: False

True or false? Invoking a subclass-only method through a subclass variable is not allowed.

Add Comment

True or false? Invoking a subclass-only method through a subclass variable is not allowed.



Answer: False

True or false? All methods in an abstract class must be declared as abstract methods.

Add Comment

True or false? All methods in an abstract class must be declared as abstract methods.



Answer: False

Casting a reference stored in a superclass variable to a subclass type is called __________.

Add Comment

Casting a reference stored in a superclass variable to a subclass type is called __________.



Answer: Downcasting

Methods that are not interface methods and that do not provide implementations must be declared using keyword __________.

Add Comment

Methods that are not interface methods and that do not provide implementations must be declared using keyword __________.



Answer: Abstract

_________ involves using a superclass variable to invoke methods on superclass and subclass objects, enabling you to "program in the general."

Add Comment

_________ involves using a superclass variable to invoke methods on superclass and subclass objects, enabling you to "program in the general."



Answer: Polymorphism

Subscribe to: Comments (Atom)

Search your questions here...

Trending Questions

  • A JSP page called test.jsp is passed a parameter name in the URL using http://localhost/Final/test.jsp?name=John. The test.jsp contains the following code.
    A JSP page called test.jsp is passed a parameter name in the URL using http://localhost/Final/test.jsp?name=John. The test.jsp contains th...
  • If the increment operator is __________ to a variable, first the variable is incremented by 1, then its new value is used in the expression.
    If the increment operator is __________ to a variable, first the variable is incremented by 1, then its new value is used in the expression....
  • What gets printed when the following code snippet is compiled? Select the one correct answer. <% int y = 0; %> <% int z = 0; %>
    What gets printed when the following code snippet is compiled? Select the one correct answer. <% int y = 0; %> <% int z = 0; %...
  • To send binary output in a response, the following method of HttpServletResponse may be used to get the appropriate Writer/Stream object.
    To send binary output in a response, the following method of HttpServletResponse may be used to get the appropriate Writer/Stream object. ...
  • A void method uses the keyword____in its heading to show that it does not return a value : public void methodName(paramList)
    A void method uses the keyword____in its heading to show that it does not return a value : public void methodName(paramList) Answer: vo...
  • Which is NOT a scope of implicit objects of JSP file?
    Which is NOT a scope of implicit objects of JSP file? a. application b. page c. request d. session e. response Answer: E
  • (10110) Following is the code for doGet() and doPost() method of TestServlet. Which of the statement is correct?
    (10110) Following is the code for doGet() and doPost() method of TestServlet. Which of the statement is correct? a. This will only wo...
  • A JSP page needs to generate an XML file. Which attribute of page directive may be used to specify that the JSP page is generating an XML file?
    A JSP page needs to generate an XML file. Which attribute of page directive may be used to specify that the JSP page is generating an XML ...
  • Select the correct directive statement insert into the first line of following lines of code (1 insert code here):
    Select the correct directive statement insert into the first line of following lines of code (1 insert code here): a. <%@page imp...
  • JSP __________ let you insert arbitrary code into the servlet's _jspService method (which is called by service).
    JSP __________ let you insert arbitrary code into the servlet's _jspService method (which is called by service).  a. scriptlets ...

Blog Archive

  • March (110)
  • June (46)
  • February (54)
  • September (68)
  • July (47)
  • February (147)

Label

Absolute Java Chapter 4 Advanced Java JAVA Java Chapter 4
Powered by Blogger.
Copyright © 2015 Ad Java MCQ | Term Of Service | Disclaimer | Privacy Policy | DMCA