CSE 110 Final Exam | 60 Questions with 100% Correct Answers | Verified | Latest Update 2024
What are the indexes for the first and last positions of an array called x? - x[0] and x[h-1] Immediately after instantiating a new array of primitives, what fills the array? What about an array of objects? - Primitive: default value fills the array (0 for int, 0.0 for double, false for boolean) Objects: null fills array What happens when you try to access an array element past the end of an array? - An exception of type ArrayIndexOutOfBoundsException is thrown Instantiate three arrays called x,y,and z of types int, String, and BankAccount, respectively, all of size 10. - int[] x = new int[10]; String[] y = new String[10]; BankAccount[] z = new BankAccount[10]; 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)) Use the following full array x:{4,8,5,1,6,3,2}
Written for
- Institution
- CSE 110
- Course
- CSE 110
Document information
- Uploaded on
- January 16, 2024
- Number of pages
- 9
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
cse 110 final exam 60 questions with 100 correc
Also available in package deal