Summary Multiple Choice Questions
Summary Multiple Choice Questions
Summary Multiple Choice Questions
1. _______ refers to the process of locating and removing the errors in a program
A. Analyzing
B. Correcting
C. Debugging
D. Executing
2. Who invented C++?
A. Dennis Ritchie
B. Ken Thompson
C. Brian Kernighan
D. Bjarne Stroustrup
3. What is C++?
A. C++ is an object-oriented programming language
B. C++ is a procedural programming language
C. C++ supports both procedural and object-oriented programming language
D. C++ is a functional programming language
4. Which of the following is the correct syntax of including a user defined header files in C++?
A. #include [userdefined]
B. #include “userdefined”
C. #include <userdefined.h>
D. #include <userdefined>
5. Which of the following is used for comments in C++?
A. /* comment */
B. // comment */
C. // comment
D. both // comment or /* comment */
6. The feature that allows the same operations to be carried out differently depending on the object is __
A. Polymorphism
B. Polygamy
C. Inheritane
D. Multitasking
A. to move objects
B. to define behavior
C. to rotate objects
D. to turn objects
14. Which statement is true about Java?
A. Java is a sequence-dependent programming language
B. Java is a code dependent programming language
C. Java is a platform-dependent programming language
D. Java is a platform-independent programming language
15. Which component is used to compile, debug and execute the java programs?
A. JRE
B. JIT
C. JDK
D. JVM
16. Which of the following cannot be part of a function declaration?
A. Function name
B. Function return type
C. Function parameter
D. Function definition
17. Which one of the following is not a Java feature?
A. Object-oriented
B. Use of pointers
C. Portable
D. Dynamic and Extensible
18. Which of these cannot be used for a variable name in Java?
A. identifier & keyword
B. identifier
C. keyword
D. none of the mentioned
19. What will be the output of the following Java code?
A. 32
B. 33
C. 24
D. 25
20. You have declared an integer pointer called point You have also declared an integer called number.
Which statement is the correct format?
A. point = number;
B. point = *number;
C. point = &number;
D. point = +number;
21. Which of the following is not an Object-Oriented programming concept in Java?
A. Polymorphism
B. Inheritance
C. Compilation
D. Encapsulation
22. What is not the use of “this” keyword in Java?
A. Referring to the instance variable when a local variable has the same name
B. Passing itself to the method of the same class
C. Passing itself to another method
D. Calling another constructor in constructor chaining
23. Which of the following is a type of polymorphism in Java Programming?
A. Multiple polymorphism
B. Compile time polymorphism
C. Multilevel polymorphism
D. Execution time polymorphism
24. What is Truncation in Java?
A. Floating-point value assigned to a Floating type
B. Floating-point value assigned to an integer type
C. Integer value assigned to floating type
D. Integer value assigned to floating type
25. What will be the output of the following Java program?
A. 1 2 3 4 5
B. 1 2 3 4
C. 1 2
D. 1 2 3
26. What is the extension of compiled java classes?
A. .txt
B. .js
C. .class
D. .java
27. What will be the output of the following Java program?
A. 9.0
B. 8.0
C. 4.0
D. 2.0
28. Which of these statements is incorrect about Thread?
A. start () method is used to begin execution of the thread
B. run() method is used to begin execution of a thread before start() method in special cases
C. A thread can be formed by implementing Runnable interface only
D. A thread can be formed by a class that extends Thread class
29. Which of these keywords are used for the block to be examined for exceptions?
A. check
B. throw
C. catch
D. try
30. An applet program can
A. network protocols
B. employee management sysytem
C. large software
D. library management system
32. Which of the following methods is invoked first in executing an applet program?
A. init()
B. start()
C. pain()
D. stop()
33. Which of the following cannot be supported by java programming?
A. Single inheritance
B. Application programming interface
C. Header files
D. Encapsulation
34. Which one of the following is not an access modifier?
A. Protected
B. Void
C. Public
D. Private
35. Which class provides system independent server-side implementation?
A. Server
B. ServerReader
C. Socket
D. ServerSocket
36. Which of the following is true about servlets?
A. Servlets can use the full functionality of the Java class libraries
B. Servlets execute within the address space of web server, platform independent and uses
the functionality of java class libraries
C. Servlets execute within the address space of web server
D. Servlets are platform-independent because they are written in java
37. Which one acts as communication endpoint between applications?
A. IP Address
B. Port number
C. Socket
D. Uniform Resource Locator
38. Give the abbreviation of AWT?
A. 1
B. 2
C. 0
D. 3
41. Give the abbreviation of AWT?
A. TCP
B. TCP/IP
C. UDP
D. HTTP
45. Which of the following hosts Java web applications?
A. Tomcat
B. Eclipse
C. NetBeans
D. JDK
46. Thread priority in Java is?
A. Integer
B. Float
C. Double
D. Long
47. Which of the following is not true?
A. Classes with the same name must be derived from one another
B. Knowledge of a general category can be applied to more specific objects
C. C++ functions may be used only if they have logical predecessors
D. One function name may invoke different methods
49. A function that is called automatically each time an object is created is a(n)
A. Constructor
B. Contractor
C. Builder
D. Architect
50. An expression contains relational, assignment and arithmetic operators. In the absence of parentheses,
the order of evaluation will be
1.C 6.A 11.D 16.D 21.C 26.C 31.A 36.B 41.C 46.C
2.D 7.C 12.B 17.B 22.B 27.B 32.A 37.C 42.B 47.B
3.C 8.D 13.B 18.C 23.B 28.B 33.C 38.B 43.C 48.A
4.D 9.A 14.D 19.A 24.B 29.D 34.B 39.C 44.A 49.B
5.D 10.D 15.C 20.C 25.D 30.D 35.D 40.B 45A 50.C