Which of the following statements is false a a public

This preview shows page 14 - 17 out of 23 pages.

We have textbook solutions for you!
The document you are viewing contains questions related to this textbook.
JavaScript: The Web Warrior Series
The document you are viewing contains questions related to this textbook.
Chapter 4 / Exercise 15
JavaScript: The Web Warrior Series
Vodnik
Expert Verified
40. Which of the following statements is false? A. A public class can be accessed by a class from a different package. B. A private method cannot be accessed by a class in a different package. C. A protected method can be accessed by a subclass in a different package. D. A method with no visibility modifier can be accessed by a class in a different package.
41. Which statements are most accurate regarding the following classes? class A { private int i; protected int j; } class B extends A { private int k; protected int m; }
42. Which statements are most accurate regarding the following classes?
We have textbook solutions for you!
The document you are viewing contains questions related to this textbook.
JavaScript: The Web Warrior Series
The document you are viewing contains questions related to this textbook.
Chapter 4 / Exercise 15
JavaScript: The Web Warrior Series
Vodnik
Expert Verified
private int k; protected int m; // some methods omitted } A. In the class B, an instance method can only access i, j, k, m. B. In the class B, an instance method can only access j, k, m. C. In the class B, an instance method can only access j, m. D. In the class B, an instance method can only access k, m. 43. Which of the following classes cannot be extended?
}}
}} 44. Polymorphism means ______________. A. that data fields should be declared private B. that a class can extend another class C. that a variable of supertype can refer to a subtype object D. that a class can contain another class
45. Encapsulation means ______________.
46. Inheritance means ______________.
47. Composition means ______________.
Ch. 12 Exception Handling and Text I/O48. A Java exception is an instance of __________. A. RuntimeException B. Exception C. Error D. Throwable E. NumberFormatException
49. An instance of _________ describes system errors. If this type of error occurs, there is little you can do beyond notifying the user and trying to terminate the program gracefully.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture