Java MCQ Online Test | Java Objective Questions | Sanfoundry Java MCQ for the preparation of academic and competitive examinations.
Welcome to our comprehensive Java MCQ online test, designed to help you master Java programming concepts through a series of objective questions. Whether you are a beginner or an experienced programmer looking to brush up on your Java skills, this test is the perfect resource for you.
We have carefully curated a collection of challenging questions that cover a wide range of topics in Java programming. By taking this test, you will not only enhance your knowledge but also gain confidence in your Java programming abilities.
Java MCQ Online Test
1. Java was introduced by-
a. AT & T Bell lab
b. Sun Microsystems
c. Microsoft
d. IBM
2. In Java we can create web pages using appreciation called-
a. Interface
b. Appeits
c. Swing
d. Streams
3. Abstraction, encapsulation, inheritance, and polymorph are-
a. Procedural prog
b. Objects
c. OOPS concepts
d. Algorithmic
4. Wrapping up of data & method into a single unit is known as-
a. Abstracters
b. Encapsulation
c. Polymorph in
d. Dynamic binding
5. Concept of inheritance provides the idea of-
a. Data hiding
b. Reversibility
c. Data encapsulation
d. Data abstraction
6. Sinpl, Robot, and secure are the feature of –
a. Java
b. Byte code
c. .Net
d. VB
8. Capital converts the Java prog into intermeddle language rep. Called-
a. Byte representation
b. Byte code
c. Byte
d. Clan
9. Extension of Java file is-
a. .doc
b. .pas
c. .txt
d. .java
10. When a Java file is compiled it is compiled as-
a. .clan
b. .java
c. .javac
d. .txt
11. In a Java program we can-
a. Write once, run once
b. Write once, run anywhere
c. Write everywhere, run anywhere
d. Write anywhere, run once
12. Readymade package for the package is-
a. Java API
b. Java applet
c. Java JVM
d. Java clan
13. Java APJ stands for-
a. Java applet program interpretation
b. Java application programming interior
c. Java application programming
d. Java applet process interface
14. After compilation the Java prog is coveted to-
a. Byte
b. Java file
c. Byte code
d. Byte basic
15. Java API & JUM form a-
a. Java applet
b. Java platform
c. Java database
d. Java pate
16. JDK stands for-
a. Java data kit
b. Java down kit
c. Java development kit
d. Java development key
17. Size/Format of the float is-
a. 32-bit 2’s
b. 64-bit 2’s
c. 64-bit IEEE 754
d. 32-bit IEEE 754
18. Bob Lean can either be-
a. Yes or No
b. Write or Wrong
c. True or False
d. 8 bit or 16 bit
19. Java ancestor is a language called-
a. C++
b. Oak
c. C
d. Sun
20. The operator used to complete the remainder of dividing op1 by op2.
a. *
b. –
c. /
d. %
21. To increment value we refer to the operator.
a. —
b. ++
c. &&
d. //
22. Equal to is a ___ operator.
a. Compiler
b. Variable
c. Logical
d. Comparison
23. Not operation is performed by using-
a. !
b. ><
c. ≠
d. :
24. Ternary operator is basically shorthand of-
a. Go to
b. While
c. If else
d. If else while
25. ____ & ? operator is also used a –
a. Binary
b. Unary
c. Ternary
d. Logical
26. Bitwise operator allows you-
a. Bit coordination
b. Complement
c. Bit manipulation
d. Assignment
27. ۸ operator is –
a. Bitwise complement
b. Bitwise OR
c. Bitwise XOR
d. Bitwise AND
28. >>> has the following operators.
a. Shift left
b. Shift right
c. Shift left by distance
d. Shift left by distance
29. Correct syntax for Loop is-
a. For (initial statement, termination bond, increment instruction)
b. For (initial statement, increment statement)
c. For (I = 0, C++)
d. For (termination condition, increment)
30. Syntax for while Loop.
a. While (condition) { ………..}
b. While { ………..} (condition)
c. Condition {while}
d. While {………}
31. Which statement is used to jump out of the loop?
a. Do while
b. While
c. Break
d. Continue
32. Which form of the continue statement makes the executive continue at the next iteration?
a. Break
b. Use case
c. Next
d. Label
33. In which statement the loops are skipped and the next iteration starts.
a. Break
b. Continue
c. Go to
d. Label
34. Int value [ ] is a format used to represent-
a. Command
b. List
c. Value
d. Array
35. Which represents the array, which stores the value 10.
a. new int [10];
b. array [10];
c. intvalue [ ]= new int [10];
d. int value [10];
36. Which keyword creates a new array object?
a. New
b. Create
c. Value
d. Delete
37. Constructor, which doesn’t take any parameter is called-
a. Default constructor
b. Destructor
c. Copy constructor
d. Constructor
38. Variable that is declared outside the method definition.
a. Clan instant
b. Clan variable
c. Instance variable
d. Local variable
39. Variable that is defined with the method.
a. Local
b. Global
c. Clan
d. Instance
40. The name of the method & list of parament is called-
a. Signature of method
b. Label
c. Block
d. Super clan
41. Keyword that is used to access the value of instance or clan variable.
a. Return
b. Method
c. This
d. Display
42. “Java Appe” run with the argument given at-
a. Runtime
b. Exception
c. Command line
d. Argument
43. Method that provides general capabilities are defined as-
a. Method
b. Accumspecifier
c. Clarifier
d. Clan method
44. Some name for more that one can be implemented by-
a. Overloading
b. Overriding
c. Overlapping
d. Over existing
45. Which of the following statement are correct?
a. Consultants do not have the return type
b. Do not have the same name as the name of the clan
c. Are not called automatically
d. Created when the object is not created
46. The concept of using a method & variable defined in another clan.
a. Encapsulation
b. Inheritance
c. Abstraction
d. Abstract
47. Which Java clan is at the top & the hierarchy of clans?
a. Instance
b. Tree
c. Clan
d. Object
48. Clan sub-clan ___ super dan &
a. Return
b. Object
c. Restore
d. Extends
49. Variables are declared as final whom their values.
a. Change always
b. Do not change
c. Change some time
d. Is not present
50. A Java prog can have-
a. Multiple inheritances
b. Multi-level inheritance
c. No inheritance
d. Single inheritance
51. Keyboard used for interface purposes-
a. Implements
b. Inheritance
c. Interface
d. Identifier
52 ……… is a collector of clans and inheritance of similar nature
a. Extends
b. Abstract
c. Method
d. package
53. Java Long prog automatically import all clans in
a. Java util package
b. java applet package
c. java long package
d. java i0 package
54. Package in while all public clans are available
a. java i0
b. java util
c. java package
d. java….
55. When no accent control modifies in speeded then it is termed as
a. Acan Modifier
b. special modify
c. default modifier
d. modifier
56. ……….. modifies makes a method or variable completely available to a clear
a. default
b. protected
c. private
d. public
57. An event that occurs during the executes a program that disrupts the normal flow of inst:
a. exception
b. error
c. object
d. clan
58. Instance of error is an internal error called in
a. error environment
b. compile-time environment
c. error
d. routine environment
59. In run time excepts we can include:
a. syntax error
b. logical error
c. semeiotic error
d. / by 0 error
60. An exception in which we try to access an object through a null reference.
a. Null exception
b. pointer exception
c. zero exception
d. no exception
61. Instances of clam that inherit fool a class called.
a. throws
b. throwable
c. finally
d. final
62. EOF exception stands for
a. end of the folder
b. existence of the file
c. end of file
d. existing field
63. 10 exception stands
a. Input exception
b. input-output exception
c. input outburst exception
d. in out exception
64. Throwable has 2 sub clam
a. input & output
b. error & process
c. error & exception
d. exception & handling
65. Code that throws an exception
a. catch block
b. try/catch block
c. try block
d. throw block
66. Another option to use a try/catch block is
a. throws
b. finally
c. final
d. catch
67. When multiple exceptions are to be thrown which clause is used.
a. finally
b. final
c. throws
d. catch
68 How can we create an obj of a class
a. new object
b. new
c. create
d. drew
69. All data in Java is written and read
a. strings
b. extends
c. streams
d. strimps
70. Standard input stream or a stream that responds to keyboard input
a. system out
b. system error
c. system in
d. system
Download Java MCQ Online Test Papers in Pdf
Fundamentals of IT & Programming MCQs with Answers
Conclusion
The Java MCQ online test provided is an invaluable resource for anyone looking to improve their knowledge and skills in Java programming. With a wide range of objective questions covering various topics related to Java, this test allows individuals to assess their understanding and identify areas for improvement.
The detailed explanations provided for each question further enhance the learning experience, making it easier for learners to grasp complex concepts.
By regularly practicing with this online test, individuals can strengthen their Java programming abilities and increase their chances of success in interviews and examinations. If You like the post on Java MCQ Online Test, please share it on social media.
its really very usefull …………thank you