MCQOPTIONS
Saved Bookmarks
This section includes 48 Mcqs, each offering curated multiple-choice questions to sharpen your Birlasoft knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
JVM stands for? |
| A. | Java Very Large Machine |
| B. | Java Verified Machine |
| C. | Java Very Small Machine |
| D. | Java Virtual Machine |
| Answer» E. | |
| 2. |
Which keyword is used by classes to implement an interface? |
| A. | import |
| B. | implements |
| C. | instance of |
| D. | None of the above |
| Answer» C. instance of | |
| 3. |
Abbreviate the term POJO? |
| A. | Plain Old Java Object |
| B. | Performance Old Java Object |
| C. | Performance Optimize Java Object |
| D. | None of the above |
| Answer» B. Performance Old Java Object | |
| 4. |
Struts supports which of these model components? |
| A. | JavaBeans |
| B. | EJB |
| C. | CORBA |
| D. | All Mentioned above |
| Answer» E. | |
| 5. |
Unchecked exceptions are checked at compile-time rather they are checked at runtime. |
| A. | True |
| B. | False |
| Answer» C. | |
| 6. |
Which method returns the interrupted flag after that it sets the flag to false if it is true? |
| A. | isInterrupted() |
| B. | static interrupted() |
| C. | non static interrupted() |
| D. | Both A & C |
| Answer» C. non static interrupted() | |
| 7. |
From the following statements which is a disadvantage of an java array? |
| A. | An array can hold primitive types data |
| B. | An array has its size that is known as array length |
| C. | An array knows only its type that it contains. Array type is checked at the compile-time |
| D. | An array holds only one type of data |
| Answer» E. | |
| 8. |
The following Syntax is used for? class Subclass-name extends Superclass-name { //methods and fields } |
| A. | Polymorphism |
| B. | Encapsulation |
| C. | Inheritance |
| D. | None of the above |
| Answer» D. None of the above | |
| 9. |
Which method when implemented must return true while there are still more elements to extract, and false when all the elements have been enumerated? |
| A. | Object nextElement( ) |
| B. | boolean hasMoreElements( ) |
| C. | Both A & B |
| D. | None of the above |
| Answer» C. Both A & B | |
| 10. |
Where are the following four methods commonly used? 1) public void add(Component c) 2) public void setSize(int width,int height) 3) public void setLayout(LayoutManager m) 4) public void setVisible(boolean) |
| A. | Graphics class |
| B. | Component class |
| C. | Both A & B |
| D. | None of the above |
| Answer» C. Both A & B | |
| 11. |
Implement the Listener interface and overrides its methods is required to perform in event handling. |
| A. | True |
| B. | False |
| Answer» C. | |
| 12. |
Which is the container that doesn't contain title bar and MenuBars but it can have other components like button, textfield etc? |
| A. | Window |
| B. | Frame |
| C. | Panel |
| D. | Container |
| Answer» D. Container | |
| 13. |
These two ways are used to create a Frame By creating the object of Frame class (association) By extending Frame class (inheritance) |
| A. | True |
| B. | False |
| Answer» B. False | |
| 14. |
In Servlet Terminology what provides runtime environment for JavaEE (j2ee) applications. It performs many operations that are given below: 1. Life Cycle Management 2. Multithreaded support 3. Object Pooling 4. Security etc. |
| A. | Server |
| B. | Webserver |
| C. | Container |
| D. | Application Server |
| Answer» D. Application Server | |
| 15. |
The following example shows the creation of a import java.applet.*; import java.awt.*; public class Main extends Applet{ public void paint(Graphics g){ g.drawString("Welcome in Java Applet.",40,20); } } |
| A. | Banner using Applet |
| B. | Basic Applet |
| C. | Display clock |
| D. | None of the above |
| Answer» C. Display clock | |
| 16. |
An applet can play an audio file represented by the AudioClip interface in the java, applet package Causes the audio clip to replay continually in which method? |
| A. | public void play() |
| B. | public void loop() |
| C. | public void stop() |
| D. | None of the above |
| Answer» C. public void stop() | |
| 17. |
Which are the common security restrictions in applets? |
| A. | Applets cant load libraries or define native methods |
| B. | An applet cant read every system property |
| C. | Applets can play sounds |
| D. | Both A & B |
| Answer» E. | |
| 18. |
In order to transfer data between a database and an application written in the Java programming language, the JDBC API provides which of these methods? |
| A. | Methods on the ResultSet class for retrieving SQL SELECT results as Java types. |
| B. | Methods on the PreparedStatement class for sending Java types as SQL statement parameters. |
| C. | Methods on the CallableStatement class for retrieving SQL OUT parameters as Java types. |
| D. | All mentioned above |
| Answer» E. | |
| 19. |
The JDBC API has always supported persistent storage of objects defined in the Java programming language through the methods getObject and setObject. |
| A. | True |
| B. | False |
| Answer» C. | |
| 20. |
Which JDBC type represents a "single precision" floating point number that supports seven digits of mantissa? |
| A. | REAL |
| B. | DOUBLE |
| C. | FLOAT |
| D. | INTEGER |
| Answer» B. DOUBLE | |
| 21. |
Which method is used for retrieving streams of both ASCII and Unicode characters is new in the JDBC 2.0 core API? |
| A. | getCharacterStream |
| B. | getBinaryStream |
| C. | getAsciiStream |
| D. | getUnicodeStream |
| Answer» B. getBinaryStream | |
| 22. |
How many Result sets available with the JDBC 2.0 core API? |
| A. | 2 |
| B. | 3 |
| C. | 4 |
| D. | 5 |
| Answer» D. 5 | |
| 23. |
Abbreviate the term UDA? |
| A. | Unified Data Access |
| B. | Universal Data Access |
| C. | Universal Digital Access |
| D. | Uniform Data Access |
| Answer» C. Universal Digital Access | |
| 24. |
What technique is used for the authentication mechanism in the servlet specification? |
| A. | Role Based Authentication |
| B. | Form Based Authentication |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. Form Based Authentication | |
| 25. |
Which attribute specifies a JSP page that should process any exceptions thrown but not caught in the current page? |
| A. | The ErrorPage Attribute |
| B. | The IsErrorPage Attribute |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. The IsErrorPage Attribute | |
| 26. |
In RMI Architecture which layer Intercepts method calls made by the client/redirects these calls to a remote RMI service? |
| A. | Stub & Skeleton Layer |
| B. | Application Layer |
| C. | Remote Reference Layer |
| D. | Transport Layer |
| Answer» B. Application Layer | |
| 27. |
Which is an object, acts as a gateway for the client side, all the outgoing requests are routed through it and it resides at the client side and represents the remote object? |
| A. | Stub |
| B. | Skeleton |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. Skeleton | |
| 28. |
Which services are provided to EJB components by the EJB container? |
| A. | Transaction support |
| B. | Persistence support |
| C. | Naming support |
| D. | All mentioned above |
| Answer» E. | |
| 29. |
Which case of a session bean obtains the UserTransaction object via the EJBContext using the getUserTransaction() method in EJB transaction management? |
| A. | Bean-managed transactions |
| B. | Container-managed transactions |
| C. | Both A & B |
| D. | None of the above |
| Answer» B. Container-managed transactions | |
| 30. |
Connection Pooling Class manages no of user requests for connections to improve the performance. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 31. |
Which object of HttpSession can be used to view and manipulate information about a session? |
| A. | session identifier |
| B. | creation time |
| C. | last accessed time |
| D. | All mentioned above |
| Answer» E. | |
| 32. |
What does the following declaration mean? |
| A. | ptr is array of pointers to 10 integers |
| B. | ptr is a pointer to an array of 10 integers |
| C. | ptr is an array of 10 integers |
| D. | ptr is an pointer to array |
| Answer» C. ptr is an array of 10 integers | |
| 33. |
How will you free the allocated memory? |
| A. | remove(var-name); |
| B. | free(var-name); |
| C. | delete(var-name); |
| D. | dalloc(var-name); |
| Answer» C. delete(var-name); | |
| 34. |
In the following code, the P2 is Integer Pointer or Integer? typedef int *ptr; ptr p1, p2; |
| A. | Integer |
| B. | Integer pointer |
| C. | Error in declaration |
| D. | None of the above |
| Answer» C. Error in declaration | |
| 35. |
In the following code what is 'P'? typedef char *charp; const charp P; |
| A. | P is a constant |
| B. | P is a character constant |
| C. | P is character type |
| D. | None of the above |
| Answer» B. P is a character constant | |
| 36. |
What is x in the following program? #include<stdio.h> int main() { typedef char (*(*arrfptr[3])())[10]; arrfptr x; return 0; } |
| A. | x is a pointer |
| B. | x is an array of three pointer |
| C. | x is an array of three function pointers |
| D. | Error in x declaration |
| Answer» D. Error in x declaration | |
| 37. |
How will you free the memory allocated by the following program? #include<stdio.h> #include<stdlib.h> #define MAXROW 3 #define MAXCOL 4 int main() { int **p, i, j; p = (int **) malloc(MAXROW * sizeof(int*)); return 0; } |
| A. | memfree(int p); |
| B. | dealloc(p); |
| C. | malloc(p, 0); |
| D. | free(p); |
| Answer» E. | |
| 38. |
What do the following declaration signify? |
| A. | pf is a pointer to function. |
| B. | pf is a function pointer. |
| C. | pf is a pointer to a function which return int |
| D. | pf is a function of pointer variable. |
| Answer» D. pf is a function of pointer variable. | |
| 39. |
What do the following declaration signify? |
| A. | argv is a pointer to pointer. |
| B. | argv is a pointer to a char pointer. |
| C. | argv is a function pointer. |
| D. | argv is a member of function pointer. |
| Answer» C. argv is a function pointer. | |
| 40. |
Which among the following is right? |
| A. | sizeof(struct stemp*) > sizeof(union utemp*) > sizeof(char *) |
| B. | sizeof(struct stemp*) < sizeof(union utemp*) < sizeof(char *) |
| C. | sizeof(struct stemp*) = sizeof(union utemp*) = sizeof(char *) |
| D. | The order Depends on the compiler |
| Answer» D. The order Depends on the compiler | |
| 41. |
The maximum combined length of the command-line arguments including the spaces between adjacent arguments is |
| A. | 128 characters |
| B. | 256 characters |
| C. | 67 characters |
| D. | It may vary from one operating system to another |
| Answer» E. | |
| 42. |
What do the 'c' and 'v' in argv stands for? |
| A. | c means argument control v means argument vector |
| B. | c means argument count v means argument vertex |
| C. | c means argument count v means argument vector |
| D. | c means argument configuration v means argument visibility |
| Answer» D. c means argument configuration v means argument visibility | |
| 43. |
Specify the 2 library functions to dynamically allocate memory? |
| A. | malloc() and memalloc() |
| B. | alloc() and memalloc() |
| C. | malloc() and calloc() |
| D. | memalloc() and faralloc() |
| Answer» D. memalloc() and faralloc() | |
| 44. |
Input/output function prototypes and macros are defined in which header file? |
| A. | conio.h |
| B. | stdlib.h |
| C. | stdio.h |
| D. | dos.h |
| Answer» D. dos.h | |
| 45. |
What is the sequence for preprocessor to look for the file within <> ? |
| A. | The predefined location then the current directory |
| B. | The current directory then the predefined location |
| C. | The predefined location only |
| D. | The current directory location |
| Answer» B. The current directory then the predefined location | |
| 46. |
How is search done in #include and #include "somelibrary.h" according to C standard? |
| A. | When former is used, current directory is searched and when latter is used, standard directory is searched |
| B. | When former is used, standard directory is searched and when latter is used, current directory is searched |
| C. | When former is used, search is done in implementation defined manner and when latter is used, current directory is searched |
| D. | For both, search for ‘somelibrary’ is done in implementation-defined places |
| Answer» E. | |
| 47. |
In what ratio must water be mixed with milk to gain 16 2/3 % by selling the mixture at cost price? |
| A. | 1:6 |
| B. | 2:3 |
| C. | 4:3 |
| D. | 6:1 |
| Answer» B. 2:3 | |
| 48. |
Two vessels P and Q contain 62.5% and 87.5% of alcohol respectively. If 2 litres from vessel P is mixed with 4 litres from vessel Q, the ratio of alcohol and water in the resulting mixture is? |
| A. | 16 : 5 |
| B. | 14 : 5 |
| C. | 16 : 7 |
| D. | 19 : 5 |
| Answer» E. | |