CMSC Exam
Verified Exam Questions and Answers Latest update 2026/2027
Question:
What is the foundation of digital encoding in computers? -
Answer:
Binary (Base-2), which represents information with 1s and 0s.
Question:
Why do we use hexadecimal? -
Answer:
It simplifies binary, used in
memory addresses, colors, and byte representation.
Question:
How do you convert decimal to binary? -
Answer:
Divide by 2 repeatedly,
record remainders, then read remainders in reverse.
Question:
What is a byte? -
Answer:
8 bits.
Question:
What are Java's primitive integer data types? -
Answer:
byte, short, int,
long.
Question:
What are Java's floating-point data types? -
Answer:
float and double.
Question:
Is String a primitive type in Java? -
, Answer:
No, it is a class.
Question:
What is a method signature? -
Answer:
A method's return type, name, and
parameter list.
Question:
What does 'static' mean in a method? -
Answer:
It belongs to the class, can
be called without creating an object.
Question:
What is pass-by-value in Java? -
Answer:
Arguments passed to methods
are copied; parameters are local and destroyed after method ends.
Question:
What is the difference between public and private methods? -
Answer:
Public methods can be accessed outside the class; private methods can only be used inside the
class.
Question:
What are advantages of using methods? -
Answer:
Code reusability,
readability, easier debugging.
Question:
What are the three types of loops in Java? -
Answer:
while, do-while, for.
Question:
What is a sentinel value? -
Verified Exam Questions and Answers Latest update 2026/2027
Question:
What is the foundation of digital encoding in computers? -
Answer:
Binary (Base-2), which represents information with 1s and 0s.
Question:
Why do we use hexadecimal? -
Answer:
It simplifies binary, used in
memory addresses, colors, and byte representation.
Question:
How do you convert decimal to binary? -
Answer:
Divide by 2 repeatedly,
record remainders, then read remainders in reverse.
Question:
What is a byte? -
Answer:
8 bits.
Question:
What are Java's primitive integer data types? -
Answer:
byte, short, int,
long.
Question:
What are Java's floating-point data types? -
Answer:
float and double.
Question:
Is String a primitive type in Java? -
, Answer:
No, it is a class.
Question:
What is a method signature? -
Answer:
A method's return type, name, and
parameter list.
Question:
What does 'static' mean in a method? -
Answer:
It belongs to the class, can
be called without creating an object.
Question:
What is pass-by-value in Java? -
Answer:
Arguments passed to methods
are copied; parameters are local and destroyed after method ends.
Question:
What is the difference between public and private methods? -
Answer:
Public methods can be accessed outside the class; private methods can only be used inside the
class.
Question:
What are advantages of using methods? -
Answer:
Code reusability,
readability, easier debugging.
Question:
What are the three types of loops in Java? -
Answer:
while, do-while, for.
Question:
What is a sentinel value? -