Advertisement

Udemy WW Udemy WW

Friday 4 September 2020

Multiple choice question on java - Part 3

PART-1    PART-2   PART-3


1 -Using super keyword we can call


  1. sub class constructor          

  2. super class constructor

  3. child class object    

  4. none of these


2. Data can be passed to the function through


  1. Call by value                      

  2. call by reference

  3. both of above                    

  4. none of these


3. Which of the following loop will be execute at least once even if the condition is false


  1. for loop      

  2. do-while loop

  3. while loop   

  4. none of these


4. Which of the following loop will not execute at least once  if the condition is false


  1. for loop      

  2. do-while loop

  3. while loop   

  4. none of these


5 Inheritance helps in


  1. Reduce redundancy in code        

  2. speed up the program

  3. Easy to read           

  4. none of these


6. the ++ operator  postfix and prefix has the same effect


  1. True                                    

  2. false

  3. Sometime true & sometime false   

  4. none of these


7. x=10,y=5 what would be value of z after executing the following statement

if(x>=9&&y<=8)

z=x+y;

        else

            z=x-y;


  1. 15               

  2. 5

  3. 13               

  4. none of these


8. Member of the structure are accessed by ----------- operator


  1. address operator      

  2. dot operator          

  3. scope resolution op 

  4. none of these


9. constructor can be overloaded


  1. true                        

  2. false

  3. in special cases                   

  4. none of these


10 which of the following is not


 the feature of object oriented programming


  1. Data encapsulation

  2. Inheritance

  3. Operator overloading

  4. data structure

Multiple choice question on java - Part -2

PART-1 PART-2 PART-3


1. The _________ class creates and maintains a buffer for an input stream


  1. Common BufferedInputStream

  2. BufferedStream

  3. InputStream

  4. BufferedInputStream


2.A __________ is a sequence of bytes traveling from a source to a destination over a

communication path.


  1. string

  2. stream

  3. character

  4. integer


3. Which of the following statement is the explanation of the int read () method


  1. Reads a byte of data from the input stream

  2. Reads bytes of data from the input stream and stores them in the array

  3. Reads the number of bytes specified by the third argument from the input stream and

stores.

  1. Returns the number of bytes available for reading from the input stream


4.  Which of the following assignments is illegal in Java?


  1. subclass_reference = subclass_object

  2. subclass_reference = superclass_object

  3. superclass_reference = subclass_object

  4. superclass_reference = superclass_object


5. A ___________ is java program that can be embedded in a Web page

  1. Applets

  2. Browser

  3. Package

  4. None of these


6. A applet tag is written in body tag of ___________


  1. HTMM

  2. HTTP

  3. HTML

  4. Applet

7. All applets must be declared as 


  1. Protected

  2. Public

  3. Private

  4. Static


8.________ method is called the first time an applet is loaded into the memory

of a computer


  1. init method()

  2. start method()

  3. stop method()

  4. destroy method()


9. Which of the following is a loop construct that will always be executed once?


  1. switch

  2. for

  3. while                  

  4. do …. While


10. _______ provides a database-programming interface for Java programs


  1. ODBC

  2.  JDBC

  3. DBMS

  4. DAT


11. Which of the following is NOT a part of JDBC URL?


  1. <protocol>

  2. <subprotocol>

  3. <subname>

  4. <name>


12. _________package Contains classes that help in connecting to a database


  1. sql.java

  2. mysql.java

  3. java.sql

  4. java.mysql


13. RMI stands for

  1. Remote Method Invocation

  2. Remote method invention

  3. Remote Memory Interface

  4. Reduced Method Instructions


14. CORBA stands for


  1. Common Operation Request Broker Architecture

  2. Common Object Request Bean Architecture

  3. Common Object Request Broker Architecture

  4. Component Object Request Broker Architecture


15. Which of the following statements holds good for JavaBeans?


  1. JavaBeans allows to efficiently constructing applications by Configuring and Connecting Components called Beans.

  2. Java beans are used to transfer data in distributed Systems.

  3. Java Bean is software component architecture of Java designed to use only in one Particular environment

  4. None of the above.


16.Which of the following is not a wrapper class?

  1. Vector

  2. Character

  3. Boolean

  4. Integer


17. Servlets provide an efficient replacement for _______ scripts

  1. CGI

  2. GCI

  3. API

  4. PIC


18.____________ contains the class libraries that which are needed to create servlets


  1. SDK

  2. JSDK

  3. JDK

  4. JAR


19. Choose the CORRECT statement.

  1. To write JSP code you require a browser.

  2. To test the JSPs you need a server engine.

  3. JSPs looks like HTML script

  4. JSP combines HTML and JDK tools


20. Choose the WRONG Statement


  1. Java is inherently suited for large client/server applications.

  2. A servlet is a small pluggable extension to a server that enhances the server’s functionality

  3. Java does not support networking.

  4. When you use servlet to create dynamic content for a web page or otherwise extend the functionality of a web server.

Advertisement

Udemy WW