Computer Science 1027A/B Final: CS 1027 Final Exam 2017

1002 views12 pages

Document Summary

Section number (1 - hughes, 2 - solis-oba): For each question circle only one answer: for the second part of the exam, answer each question only in the space provided, when you are done, raise your hand and one of the ta"s will collect your exam. For each multiple choice question circle only one answer: (1 marks) consider the following three java classes public class a public class b extends a public class c extends a. A vara = new b(); // line 1. C varc = new c(); vara = varc; = a; b[0] = 2; // line 1. What does the above code print? (a) 3,2 (b) 2,2 (c) nothing. A vara = new a(); is executed? (a) i = 3, j = 6 (b) i = 2, j = 5 (c) i = 1, j = 4 (d) nothing is printed as the above code throws an exception. 2: (1 mark) consider the following java code.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents

Related Questions