CSIT EXAM 1 2025/2026 QUESTIONS AND
ANSWERS 100% PASS
Byte code instructions are: - ANS Read and interpreted by the JVM
If the value of the int qty is 167 before this statement is executed, what will its value be after
the following statement is executed?
System.out.println(qty); - ANS 167
Primitive data types - ANS byte, short, int, long, float, double, boolean, char
Non-primitive data types - ANS String, arrays, classes
Valid numeric constants - ANS Consists of numerals, an optional leading sign, and an optional
decimal point (examples: 5.0, 6, - 5)
A value that cannot change during program execution is referred to as what? - ANS A
constant
What is the output of the following?
System.out.println( (25/4 + 4 * ) ); - ANS 19
pg. 1 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED
, Why is the declaration statement is invalid?
double class; - ANS class is a keyword
What will be output of the following?
int temporaryValue;
temporaryValue = (18 + 9) / 5 + 4;
System.out.println(temporaryValue); - ANS 9
What will be output of the following?
double temporaryValue;
temporaryValue = (18 + 9) / (5 + 4);
System.out.println(temporaryValue); - ANS 3.0
Assuming the variable input is properly defined using the Scanner class and qtySold is defined
as an int, how would you allow the user to enter an integer during program execution? -
ANS qtySold = input.nextInt( );
Logic error - ANS When your program compiles and executes, but does the wrong thing or
returns an incorrect result or no output when it should
Pseudocode - ANS An informal way of programming description that does not require any
strict programming language syntax or underlying technology considerations.
It is used for creating an outline or a rough draft of a program.
Summarizes a program's flow, but excludes underlying details.
Syntax error - ANS When the line of code is written incorrectly
pg. 2 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED
ANSWERS 100% PASS
Byte code instructions are: - ANS Read and interpreted by the JVM
If the value of the int qty is 167 before this statement is executed, what will its value be after
the following statement is executed?
System.out.println(qty); - ANS 167
Primitive data types - ANS byte, short, int, long, float, double, boolean, char
Non-primitive data types - ANS String, arrays, classes
Valid numeric constants - ANS Consists of numerals, an optional leading sign, and an optional
decimal point (examples: 5.0, 6, - 5)
A value that cannot change during program execution is referred to as what? - ANS A
constant
What is the output of the following?
System.out.println( (25/4 + 4 * ) ); - ANS 19
pg. 1 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED
, Why is the declaration statement is invalid?
double class; - ANS class is a keyword
What will be output of the following?
int temporaryValue;
temporaryValue = (18 + 9) / 5 + 4;
System.out.println(temporaryValue); - ANS 9
What will be output of the following?
double temporaryValue;
temporaryValue = (18 + 9) / (5 + 4);
System.out.println(temporaryValue); - ANS 3.0
Assuming the variable input is properly defined using the Scanner class and qtySold is defined
as an int, how would you allow the user to enter an integer during program execution? -
ANS qtySold = input.nextInt( );
Logic error - ANS When your program compiles and executes, but does the wrong thing or
returns an incorrect result or no output when it should
Pseudocode - ANS An informal way of programming description that does not require any
strict programming language syntax or underlying technology considerations.
It is used for creating an outline or a rough draft of a program.
Summarizes a program's flow, but excludes underlying details.
Syntax error - ANS When the line of code is written incorrectly
pg. 2 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED