CSE 110 Final EXAM COMPREHENSIVE questions answered, 2026 verified
graded A+ already passed!
Study online at https://quizlet.com/_jc2qro
1. What are the indexes for the first x[0] and x[x.length-1]
and last positions of an array called
x?
2. Immediately after instantiating a Primitive: default value fills the array (0 for int, 0.0 for
new array of primitives, what fills double, false for boolean)
the array? What about an array of
objects? Objects: null fills array
3. What happens when you try to ac- An exception of type ArrayIndexOutOfBoundsExcep-
cess an array element past the end tion is thrown
of an array?
4. Instantiate three arrays called int[] x = new int[10];
x,y,and z of types int, String, and String[] y = new String[10];
BankAccount, respectively, all of BankAccount[] z = new BankAccount[10];
size 10.
5. What is method overloading? two methods in the same class that have the same
name but different signatures (ex: int calc(double n1,
int n2) and int calc(int 1, int n2))
6. Use the following full array a. 8
x:{4,8,5,1,6,3,2} b. 2
c. ArrayIndexOutOfBounds
a. What is the value given by x[1]? d. 7
b. What is the value given by x[6]?
c. What is the value given by x[7]?
d. What is the value given by
x.length?
7.
, CSE 110 Final EXAM COMPREHENSIVE questions answered, 2026 verified
graded A+ already passed!
Study online at https://quizlet.com/_jc2qro
Write a for-loop to double each ele- for(int i = 0; i<x.length; i++) {
ment in the array x given in the aray x[i] *= 2;
x:{4,8,5,1,6,3,2} }
8. What is a static variable? Static variable and static method both belongs to the
What is a static method? class. They are not bound to instances.
9. What is the meaning of public? Refers to a visibility modifier in which anyone can see
this item
10. What is a do while loop? Code is repeated until the condition becomes false.
11. What does a class contain in object Constructors, methods, and variables
oriented programming?
12. What is encapsulation? Data and behavior is hidden
13. What are the Java primitive data byte, short, int, long, float, double, boolean, char
types?
14. What is the output of the following HelloGood Day!
code snippet?
System.out.print("Hello");
System.out.println("Good Day!");
15. Which error represents a part of a Syntax error
program that is incorrect according
to the rules of the programming lan-
guage?
16. What is the output of the following 812
code snippet?
graded A+ already passed!
Study online at https://quizlet.com/_jc2qro
1. What are the indexes for the first x[0] and x[x.length-1]
and last positions of an array called
x?
2. Immediately after instantiating a Primitive: default value fills the array (0 for int, 0.0 for
new array of primitives, what fills double, false for boolean)
the array? What about an array of
objects? Objects: null fills array
3. What happens when you try to ac- An exception of type ArrayIndexOutOfBoundsExcep-
cess an array element past the end tion is thrown
of an array?
4. Instantiate three arrays called int[] x = new int[10];
x,y,and z of types int, String, and String[] y = new String[10];
BankAccount, respectively, all of BankAccount[] z = new BankAccount[10];
size 10.
5. What is method overloading? two methods in the same class that have the same
name but different signatures (ex: int calc(double n1,
int n2) and int calc(int 1, int n2))
6. Use the following full array a. 8
x:{4,8,5,1,6,3,2} b. 2
c. ArrayIndexOutOfBounds
a. What is the value given by x[1]? d. 7
b. What is the value given by x[6]?
c. What is the value given by x[7]?
d. What is the value given by
x.length?
7.
, CSE 110 Final EXAM COMPREHENSIVE questions answered, 2026 verified
graded A+ already passed!
Study online at https://quizlet.com/_jc2qro
Write a for-loop to double each ele- for(int i = 0; i<x.length; i++) {
ment in the array x given in the aray x[i] *= 2;
x:{4,8,5,1,6,3,2} }
8. What is a static variable? Static variable and static method both belongs to the
What is a static method? class. They are not bound to instances.
9. What is the meaning of public? Refers to a visibility modifier in which anyone can see
this item
10. What is a do while loop? Code is repeated until the condition becomes false.
11. What does a class contain in object Constructors, methods, and variables
oriented programming?
12. What is encapsulation? Data and behavior is hidden
13. What are the Java primitive data byte, short, int, long, float, double, boolean, char
types?
14. What is the output of the following HelloGood Day!
code snippet?
System.out.print("Hello");
System.out.println("Good Day!");
15. Which error represents a part of a Syntax error
program that is incorrect according
to the rules of the programming lan-
guage?
16. What is the output of the following 812
code snippet?