Programming > EXAM > CSIS 212 FINAL EXAM (All)
CSIS 212 FINAL EXAM – QUESTIONS • Question 1 3 out of 3 points Which statement below could be used to simulate the outputs of tossing a quarter to get heads or tails? Suppose randomNumber... s is a SecureRandom object. • Question 2 3 out of 3 points Overloaded methods always have the same _________. • Question 3 3 out of 3 points The identifiers in an enumeration ________. • Question 4 3 out of 3 points Declaring main as static allows the JVM to invoke main ________. • Question 5 3 out of 3 points Variables should be declared as fields only if ________. • Question 6 3 out of 3 points The java.text package contains classes for manipulating all of the following items except ________. • Question 7 3 out of 3 points Which set of statements totals the items in each row of two-dimensional array items, and displays each row’s total? • Question 8 3 out of 3 points Which of the following statements is false? • Question 9 3 out of 3 points A programmer must do the following before using an array: • Question 10 0 out of 3 points How many Book objects are created by the following statement? Book[] books = new Book[10]; • Question 11 3 out of 3 points In Java, multidimensional arrays ________. • Question 12 3 out of 3 points What do the following statements do? double[] array; array = new double[14]; • Question 13 3 out of 3 points A constructor cannot: • Question 14 3 out of 3 points Constructors: • Question 15 3 out of 3 points Which syntax imports all static members of class Math? • Question 16 3 out of 3 points Using public set methods helps provide data integrity if: • Question 17 3 out of 3 points Instance variables declared final do not or cannot: • Question 18 3 out of 3 points When no access modifier is specified for a method or variable, the method or variable: • Question 19 3 out of 3 points Overriding a method differs from overloading a method because: • Question 20 3 out of 3 points Which statement is true when a superclass has protected instance variables? • Question 21 3 out of 3 points Which of the following statements is false? • Question 22 3 out of 3 points Which superclass members are inherited by all subclasses of that superclass? • Question 23 3 out of 3 points To avoid duplicating code, use ________, rather than ________. • Question 24 3 out of 3 points Using the protected keyword also gives a member: • Question 25 3 out of 3 points Which of the following is not a superclass/subclass relationship? • Question 26 3 out of 3 points Which of the following keywords allows a subclass to access a superclass method even when the subclass has overridden the superclass method? • Question 27 3 out of 3 points The default implementation of method clone of Object performs a ________. • Question 28 3 out of 3 points Consider the classes below, declared in the same file: Which of the statements below is false? class A { int a; public A() { a = 7; } } class B extends A { int b; public B() { b = 8; } } • Question 29 3 out of 3 points Private fields of a superclass can be accessed in a subclass • Question 30 3 out of 3 points Superclass methods with this level of access cannot be called from subclasses. • Question 31 3 out of 3 points When a subclass constructor calls its superclass constructor, what happens if the superclass’s constructor does not assign a value to an instance variable? • Question 32 3 out of 3 points Every class in Java, except ________, extends an existing class. • Question 33 3 out of 3 points Which of the following is the superclass constructor call syntax? • Question 34 3 out of 3 points The default equals implementation of class Object determines: • Question 35 3 out of 3 points Which of the following statements is false? • Question 36 3 out of 3 points When a superclass variable refers to a subclass object and a method is called on that object, the proper implementation is determined at execution time. What is the process of determining the correct method to call? • Question 37 0 out of 3 points Which of the following statements is false? • Question 38 3 out of 3 points Which of the following is not possible? • Question 39 3 out of 3 points Every object in Java knows its own class and can access this information through method . • Question 40 3 out of 3 points Which keyword is used to specify that a class will define the methods of an interface? • Question 41 3 out of 3 points Which of the following statements is false? • Question 42 3 out of 3 points Non-abstract classes are called ________. • Question 43 3 out of 3 points Which statement best describes the relationship between superclass and subclass types? • Question 44 3 out of 3 points Polymorphism enables you to: • Question 45 3 out of 3 points Which of the following is false? • Question 46 3 out of 3 points Which of the following statements is false? • Question 47 3 out of 3 points It is a UML convention to denote the name of an abstract class in ________. • Question 48 3 out of 3 points Which of the following could be used to declare abstract method method1 in abstract class Class1 (method1 returns an int and takes no arguments)? • Question 49 3 out of 3 points Classes and methods are declared final for all but the following reasons: • Question 50 3 out of 3 points A(n) ____________ class cannot be instantiated. [Show More]
Last updated: 2 years ago
Preview 1 out of 10 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Oct 17, 2020
Number of pages
10
Written in
This document has been written for:
Uploaded
Oct 17, 2020
Downloads
0
Views
148
In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·