• 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: Posts (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...
  • Which is a valid PostConstruct method in a message-driven bean class?
    Which is a valid PostConstruct method in a message-driven bean class? a. @PostConstruct a. public boolean init() { return true; } b. ...
  • 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. ...
  • 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
  • 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 ...
  • Instance variable declarations and _____ definitions can be placed in any order within the class definition.
    Instance variable declarations and _____ definitions can be placed in any order within the class definition. Answer: Instance variable ...
  • 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; %...
  • A superclass's __________ members can be accessed in the superclass declaration and in subclass declarations.
    A superclass's __________ members can be accessed in the superclass declaration and in subclass declarations. Answer: Public and protect...
  • True or false? An object of a class that implements an interface may be thought of as an object of that interface type.
    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
  • Which statements are BEST describe name attribute of action?
    Which statements are BEST describe name attribute of <jsp:setProperty name=.... /> action? a. The ID of the JavaBean for which a...

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