ASU CSE 110 FINAL JAVA ACTUAL QUESTIONS
WITH VERIFIED SOLUTIONS
◉ What is the meaning of public?
Answer: Refers to a visibility modifier in which anyone can see this
item
◉ What is a do while loop?
Answer: Code is repeated until the condition becomes false.
◉ What does a class contain in object oriented programming?
Answer: Constructors, methods, and variables
◉ What is encapsulation?
Answer: Data and behavior is hidden
◉ What are the Java primitive data types?
Answer: byte, short, int, long, float, double, boolean, char
◉ What is the output of the following code snippet?
, System.out.print("Hello");
System.out.println("Good Day!");
Answer: HelloGood Day!
◉ Which error represents a part of a program that is incorrect
according to the rules of the programming language?
Answer: Syntax error
◉ What is the output of the following code snippet?
System.out.print(4+4);
System.out.print(12);
Answer: 812
◉ What happens to the fractional part when a division is performed
on two integer variables?
Answer: The fractional part is discarded
◉ What will the value inside the variables x and y after the given set
of assignments?
int x = 20;
WITH VERIFIED SOLUTIONS
◉ What is the meaning of public?
Answer: Refers to a visibility modifier in which anyone can see this
item
◉ What is a do while loop?
Answer: Code is repeated until the condition becomes false.
◉ What does a class contain in object oriented programming?
Answer: Constructors, methods, and variables
◉ What is encapsulation?
Answer: Data and behavior is hidden
◉ What are the Java primitive data types?
Answer: byte, short, int, long, float, double, boolean, char
◉ What is the output of the following code snippet?
, System.out.print("Hello");
System.out.println("Good Day!");
Answer: HelloGood Day!
◉ Which error represents a part of a program that is incorrect
according to the rules of the programming language?
Answer: Syntax error
◉ What is the output of the following code snippet?
System.out.print(4+4);
System.out.print(12);
Answer: 812
◉ What happens to the fractional part when a division is performed
on two integer variables?
Answer: The fractional part is discarded
◉ What will the value inside the variables x and y after the given set
of assignments?
int x = 20;