Wednesday , November 18 2026
Breaking News

Core Java Programming Professional Certification Exam Answers 2026 (All 100 Questions)

Core Java Programming Professional Certification exam answers 2026: This page lists all 100 questions of the official Core Java Programming Professional Certification exam by Itronix Solutions, each with its four answer options and the correct answer highlighted in green. Use it to revise every topic before you attempt the test and earn your verifiable certificate.

About this certification: Test your Core Java concepts: syntax, data types, OOP, inheritance, interfaces, exceptions, collections and the JVM.

Certification Core Java Programming Professional Certification
Provider Itronix Solutions
Category Programming & Development
Total questions 100 multiple-choice questions
Marks 1 mark per question (100 marks)
Passing score 80% (80 out of 100)
Retake Available if you do not pass
Certificate Verifiable online certificate

Take the exam: Core Java Programming Professional Certification on Itronix Solutions. See every other Itronix exam in our complete list of Itronix certification answers.

Core Java Programming Exam Questions and Answers

Questions 1 to 25

1. Java code is compiled into:

A. HTML
B. Bytecode ✔
C. Machine code only
D. Python code

Correct answer: B. Bytecode

2. JVM stands for:

A. Java Variable Method
B. Joint Visual Module
C. Java Version Manager
D. Java Virtual Machine ✔

Correct answer: D. Java Virtual Machine

3. Which method is the entry point of a Java application?

A. init()
B. start()
C. run()
D. public static void main(String[] args) ✔

Correct answer: D. public static void main(String[] args)

4. Which keyword is used to inherit a class?

A. super
B. extends ✔
C. inherits
D. implements

Correct answer: B. extends

5. Which keyword is used to implement an interface?

A. include
B. implements ✔
C. extends
D. uses

Correct answer: B. implements

6. Which of these is NOT a primitive data type in Java?

A. char
B. int
C. String ✔
D. boolean

Correct answer: C. String

7. What is the default value of an int instance variable?

A. undefined
B. 1
C. 0 ✔
D. null

Correct answer: C. 0

8. Method overloading means:

A. Same method name with different parameter lists ✔
B. Deleting methods
C. Calling a method twice
D. Same method in parent and child with same signature

Correct answer: A. Same method name with different parameter lists

9. Method overriding happens when:

A. Two methods have different names
B. A class has no methods
C. A method is static only
D. A subclass provides its own implementation of a parent method ✔

Correct answer: D. A subclass provides its own implementation of a parent method

10. Which keyword prevents a class from being inherited?

A. private
B. static
C. const
D. final ✔

Correct answer: D. final

11. Encapsulation is mainly achieved by:

A. Avoiding classes
B. Using global variables
C. Using private fields with public getters and setters ✔
D. Using only static methods

Correct answer: C. Using private fields with public getters and setters

12. Which block always executes after try-catch, whether an exception occurs or not?

A. finally ✔
B. catch
C. throw
D. else

Correct answer: A. finally

13. Which collection does NOT allow duplicate elements?

A. ArrayList
B. LinkedList
C. Vector
D. HashSet ✔

Correct answer: D. HashSet

14. Which collection stores key-value pairs?

A. HashMap ✔
B. ArrayList
C. HashSet
D. Stack

Correct answer: A. HashMap

15. The keyword ‘this’ refers to:

A. The current object ✔
B. The parent class
C. A static method
D. The main method

Correct answer: A. The current object

16. Which access modifier makes a member visible everywhere?

A. private
B. default
C. protected
D. public ✔

Correct answer: D. public

17. An abstract class:

A. Must have no methods
B. Cannot have constructors
C. Is always final
D. Cannot be instantiated directly ✔

Correct answer: D. Cannot be instantiated directly

18. Which exception occurs when dividing an integer by zero?

A. IOException
B. ArithmeticException ✔
C. NullPointerException
D. ClassNotFoundException

Correct answer: B. ArithmeticException

19. String objects in Java are:

A. Primitive
B. Mutable
C. Always null
D. Immutable ✔

Correct answer: D. Immutable

20. Garbage collection in Java:

A. Automatically frees memory of unreachable objects ✔
B. Compiles code
C. Deletes source files
D. Formats the disk

Correct answer: A. Automatically frees memory of unreachable objects

21. Java was originally developed at:

A. IBM
B. Microsoft
C. Google
D. Sun Microsystems ✔

Correct answer: D. Sun Microsystems

22. Java is now owned by:

A. Microsoft
B. Apple
C. Oracle ✔
D. Meta

Correct answer: C. Oracle

23. The JRE contains:

A. The JVM and libraries needed to run Java programs ✔
B. Only the compiler
C. Only an IDE
D. Only source code

Correct answer: A. The JVM and libraries needed to run Java programs

24. javac is used to:

A. Run bytecode
B. Package JARs only
C. Compile Java source files into bytecode ✔
D. Debug only

Correct answer: C. Compile Java source files into bytecode

25. The java command is used to:

A. Edit files
B. Run compiled Java programs ✔
C. Create JARs only
D. Compile source code

Correct answer: B. Run compiled Java programs

Questions 26 to 50

26. Java source files have the extension:

A. .js
B. .jar
C. .class
D. .java ✔

Correct answer: D. .java

27. Compiled Java bytecode files have the extension:

A. .py
B. .class ✔
C. .java
D. .exe

Correct answer: B. .class

28. A public class must be saved in a file:

A. With the same name as the class ✔
B. Without an extension
C. Named Main always
D. With any name

Correct answer: A. With the same name as the class

29. Java is case-sensitive, meaning:

A. Case does not matter
B. Main and main are different identifiers ✔
C. Only keywords are case-sensitive
D. Only strings are

Correct answer: B. Main and main are different identifiers

30. Single-line comments in Java start with:

A. —
B. #
C. %
D. // ✔

Correct answer: D. //

31. Multi-line comments in Java use:

A. <!– –>
B. ## ##
C. (* *)
D. /* … */ ✔

Correct answer: D. /* … */

32. Javadoc comments start with:

A. /** ✔
B. //!
C. ##
D. <!–

Correct answer: A. /**

33. The size of an int in Java is:

A. 16 bits
B. 64 bits
C. 8 bits
D. 32 bits ✔

Correct answer: D. 32 bits

34. The size of a long in Java is:

A. 64 bits ✔
B. 16 bits
C. 32 bits
D. 128 bits

Correct answer: A. 64 bits

35. A double in Java is:

A. A 64-bit floating-point number ✔
B. A 32-bit integer
C. A character
D. A boolean

Correct answer: A. A 64-bit floating-point number

36. A char in Java is:

A. A number only
B. A string
C. A 16-bit Unicode character ✔
D. An 8-bit ASCII byte only

Correct answer: C. A 16-bit Unicode character

37. The boolean type in Java can hold:

A. true or false ✔
B. yes or no
C. 0 or 1
D. Any number

Correct answer: A. true or false

38. The default value of a boolean field is:

A. true
B. 0
C. false ✔
D. null

Correct answer: C. false

39. Integer division 7 / 2 in Java gives:

A. 3 ✔
B. 2
C. 4
D. 3.5

Correct answer: A. 3

40. 7 % 2 in Java gives:

A. 2
B. 0
C. 1 ✔
D. 3

Correct answer: C. 1

41. Casting a double 9.7 to int gives:

A. 10
B. 9 ✔
C. 9.7
D. Error

Correct answer: B. 9

42. Widening conversion from int to long is:

A. Automatic ✔
B. Lossy
C. Requires explicit cast always
D. Not allowed

Correct answer: A. Automatic

43. Narrowing conversion from double to int requires:

A. A method call always
B. An explicit cast ✔
C. A string
D. Nothing

Correct answer: B. An explicit cast

44. The ++ operator:

A. Increases a variable by 1 ✔
B. Adds 2
C. Concatenates strings
D. Doubles a variable

Correct answer: A. Increases a variable by 1

45. x += 5 is equivalent to:

A. x = x * 5
B. x = x + 5 ✔
C. x = 5
D. x == 5

Correct answer: B. x = x + 5

46. The logical AND operator is:

A. AND
B. && ✔
C. and
D. &&&

Correct answer: B. &&

47. The logical OR operator is written as:

A. Two vertical bars ✔
B. &&
C. !
D. or

Correct answer: A. Two vertical bars

48. The ternary operator syntax is:

A. condition ? value1 : value2 ✔
B. ? condition :
C. condition : value1 ? value2
D. if ? then

Correct answer: A. condition ? value1 : value2

49. String concatenation in Java can use:

A. The * operator
B. The & operator
C. The . operator
D. The + operator ✔

Correct answer: D. The + operator

50. String.length() returns:

A. The word count
B. The last character
C. The memory size
D. The number of characters ✔

Correct answer: D. The number of characters

Questions 51 to 75

51. "Java".charAt(0) returns:

A. J ✔
B. a
C. v
D. Java

Correct answer: A. J

52. "Hello".substring(1, 3) returns:

A. el ✔
B. He
C. ell
D. llo

Correct answer: A. el

53. "abc".equals("abc") returns:

A. null
B. true ✔
C. false
D. 0

Correct answer: B. true

54. "Java".toUpperCase() returns:

A. JAVA ✔
B. Java
C. jAVA
D. java

Correct answer: A. JAVA

55. String.valueOf(10) returns:

A. The string "10" ✔
B. null
C. A char
D. The int 10

Correct answer: A. The string "10"

56. Integer.parseInt("42") returns:

A. The int 42 ✔
B. An error always
C. The string "42"
D. A double

Correct answer: A. The int 42

57. The Scanner class is commonly used to:

A. Read input from the keyboard or files ✔
B. Create threads
C. Print output
D. Connect databases

Correct answer: A. Read input from the keyboard or files

58. System.out.println() prints:

A. Errors only
B. Text without a new line only
C. Nothing
D. Text followed by a new line ✔

Correct answer: D. Text followed by a new line

59. System.out.printf() allows:

A. Reading input
B. Creating files
C. Formatted output using format specifiers ✔
D. Only plain text

Correct answer: C. Formatted output using format specifiers

60. An if-else statement chooses:

A. Variable types
B. Loop counts
C. Class names
D. Between code blocks based on a condition ✔

Correct answer: D. Between code blocks based on a condition

61. A switch statement can work with:

A. Only booleans
B. int, char, String and enum values ✔
C. Only doubles
D. Only arrays

Correct answer: B. int, char, String and enum values

62. The default case in a switch runs when:

A. Only for strings
B. Never
C. Always first
D. No other case matches ✔

Correct answer: D. No other case matches

63. A for loop is typically used when:

A. The loop must run at least once
B. The number of iterations is known ✔
C. There is no condition
D. Never

Correct answer: B. The number of iterations is known

64. A while loop checks its condition:

A. Never
B. Only once
C. After each iteration
D. Before each iteration ✔

Correct answer: D. Before each iteration

65. A do-while loop runs its body:

A. At least once ✔
B. Never
C. Only when false
D. Twice

Correct answer: A. At least once

66. The enhanced for loop (for-each) is used to:

A. Iterate over arrays and collections ✔
B. Sort arrays
C. Create arrays
D. Delete elements

Correct answer: A. Iterate over arrays and collections

67. The continue statement:

A. Exits the loop
B. Restarts the program
C. Ends the program
D. Skips to the next iteration of the loop ✔

Correct answer: D. Skips to the next iteration of the loop

68. Labeled break statements can:

A. Create labels for strings
B. Comment code
C. Exit outer loops ✔
D. Skip methods

Correct answer: C. Exit outer loops

69. An array in Java is declared as:

A. int numbers = new int[5];
B. int[] numbers = new int[5]; ✔
C. array int numbers;
D. int numbers(5);

Correct answer: B. int[] numbers = new int[5];

70. Array indices in Java start at:

A. Any number
B. -1
C. 1
D. 0 ✔

Correct answer: D. 0

71. numbers.length returns:

A. The size of the array ✔
B. The sum
C. The last element
D. The first index

Correct answer: A. The size of the array

72. Accessing an index outside an array’s bounds throws:

A. ArithmeticException
B. ClassCastException
C. ArrayIndexOutOfBoundsException ✔
D. NullPointerException

Correct answer: C. ArrayIndexOutOfBoundsException

73. A two-dimensional array can be declared as:

A. grid int[3][4]
B. int[][] grid = new int[3][4]; ✔
C. int[] grid[3][4] = 0;
D. int grid[3,4];

Correct answer: B. int[][] grid = new int[3][4];

74. Arrays.sort(arr) is used to:

A. Sort an array in ascending order ✔
B. Reverse an array
C. Print an array
D. Copy an array

Correct answer: A. Sort an array in ascending order

75. Arrays.toString(arr) returns:

A. The array length
B. A sorted array
C. A readable string of array elements ✔
D. A copy

Correct answer: C. A readable string of array elements

Questions 76 to 100

76. A method in Java is:

A. A class file
B. A package
C. A variable
D. A block of code that performs a task and can be called ✔

Correct answer: D. A block of code that performs a task and can be called

77. The return type void means:

A. The method is empty
B. The method returns null
C. The method returns 0
D. The method returns no value ✔

Correct answer: D. The method returns no value

78. Method parameters in Java are passed:

A. By name
B. By pointer arithmetic
C. By reference always
D. By value (object references are passed by value) ✔

Correct answer: D. By value (object references are passed by value)

79. Method overloading requires:

A. Different class names
B. Different parameter lists with the same method name ✔
C. Different return types only
D. Same parameters

Correct answer: B. Different parameter lists with the same method name

80. A static method can be called:

A. Never
B. Using the class name without creating an object ✔
C. Only through an object
D. Only from main

Correct answer: B. Using the class name without creating an object

81. Local variables must be:

A. Static
B. Final always
C. Initialised before use ✔
D. Public

Correct answer: C. Initialised before use

82. Variable scope refers to:

A. Its value
B. Where a variable can be accessed in code ✔
C. Its data type
D. Its size

Correct answer: B. Where a variable can be accessed in code

83. A constant in Java is declared with:

A. static only
B. let
C. final ✔
D. const

Correct answer: C. final

84. Packages in Java are used to:

A. Compile code faster
B. Group related classes and avoid naming conflicts ✔
C. Create threads
D. Store data

Correct answer: B. Group related classes and avoid naming conflicts

85. The import statement allows:

A. Creating packages
B. Deleting classes
C. Using classes from other packages ✔
D. Exporting classes

Correct answer: C. Using classes from other packages

86. java.lang is:

A. A third-party library
B. Never imported
C. A database
D. Imported automatically into every Java program ✔

Correct answer: D. Imported automatically into every Java program

87. Math.sqrt(16) returns:

A. 2
B. 8
C. 4.0 ✔
D. 16

Correct answer: C. 4.0

88. Math.max(3, 7) returns:

A. 7 ✔
B. 4
C. 3
D. 10

Correct answer: A. 7

89. Math.random() returns:

A. A double between 0.0 (inclusive) and 1.0 (exclusive) ✔
B. Always 0
C. An integer from 1 to 100
D. A string

Correct answer: A. A double between 0.0 (inclusive) and 1.0 (exclusive)

90. StringBuilder.append() is used to:

A. Add text efficiently to a mutable string ✔
B. Compare strings
C. Split strings
D. Delete strings

Correct answer: A. Add text efficiently to a mutable string

91. An object is created from a class using:

A. The make keyword
B. The new keyword ✔
C. The create keyword
D. The object keyword

Correct answer: B. The new keyword

92. Instance variables belong to:

A. Packages
B. The class only
C. Methods
D. Individual objects ✔

Correct answer: D. Individual objects

93. A constructor has:

A. A void return type
B. Any name
C. The same name as the class and no return type ✔
D. A static modifier always

Correct answer: C. The same name as the class and no return type

94. If no constructor is written, Java provides:

A. An error
B. A static constructor
C. A default no-argument constructor ✔
D. No constructor

Correct answer: C. A default no-argument constructor

95. Getter and setter methods support:

A. Arrays
B. Inheritance only
C. Threads
D. Encapsulation of private fields ✔

Correct answer: D. Encapsulation of private fields

96. The == operator on objects compares:

A. Class names
B. Hash codes
C. References (memory addresses) ✔
D. Content always

Correct answer: C. References (memory addresses)

97. The main method must be:

A. static int
B. public void only
C. public static void ✔
D. private static int

Correct answer: C. public static void

98. IDEs commonly used for Java include:

A. Photoshop
B. Excel
C. Outlook
D. IntelliJ IDEA, Eclipse and NetBeans ✔

Correct answer: D. IntelliJ IDEA, Eclipse and NetBeans

99. Java’s "write once, run anywhere" means:

A. Compiled bytecode runs on any platform with a JVM ✔
B. Java runs without a JVM
C. Only Windows runs Java
D. Code must be rewritten per OS

Correct answer: A. Compiled bytecode runs on any platform with a JVM

100. The ! operator in Java:

A. Compares strings
B. Multiplies numbers
C. Negates a boolean value ✔
D. Declares arrays

Correct answer: C. Negates a boolean value

How to Pass the Core Java Programming Exam

  • Read every question carefully; most options look similar, so look for the most precise answer.
  • Revise the questions above topic by topic rather than memorising letters, because option order can change in the live test.
  • You need 80 correct answers out of 100 to pass, so aim to understand at least 85 to stay safe.
  • If you do not clear it on the first attempt, review the questions you missed and use the retake option.

Frequently Asked Questions

How many questions are in the Core Java Programming Professional Certification exam?

The exam has 100 multiple-choice questions, each worth 1 mark.

What is the passing score for the Core Java Programming Professional Certification?

You need at least 80% (80 out of 100) to pass and receive the certificate.

Can I retake the Core Java Programming Professional Certification exam?

Yes. If you score below 80%, you can retry the test after reviewing the topics.

Is the Itronix certificate verifiable?

Yes. Every certificate issued by Itronix Solutions has a unique ID that can be checked on the Itronix verify-certificate page.

More Programming & Development Certification Answers

Disclaimer: These answers are provided for learning and revision. Questions and answers are checked regularly; if you find a mistake, let us know in the comments.

About Priya Dogra

Priya Dogra runs priyadogra.com, where she shares free certification courses, internships, jobs, scholarships and exam preparation guides for Indian students and freshers. Follow her on YouTube, LinkedIn and Instagram for the latest opportunities.

Check Also

Unix/ Linux Certification exam answers 2026

Unix/ Linux Certification Exam Answers 2026 (All 100 Questions)

All 100 Unix/ Linux Certification exam questions with correct answers highlighted - updated 2026.

Leave a Reply

Your email address will not be published. Required fields are marked *