Question: 1. Each class you create becomes a ne a. package b. instance c. library d. type. that can be used to declare variables and create
1. Each class you create becomes a ne a. package b. instance c. library d. type. that can be used to declare variables and create objects 2. You can declare new classes as needed; this is one reason Java is known as a(n) language. a. portable incremental c. extensible d. virtual 3. Which of the following statements is false? a. Each class declaration that begins with the access modifier private must be stored in a file that has the same name as the class and ends with the java filename extension. b. Every class declaration contains keyword class followed immediately by the class's name c. Class, method and variable names are identifiers. d. An object has attributes that are implemented as instance variables and carried with it throughout its lifetime 4. Which of the following statements is false? a. By convention class names begin with an uppercase letter, and method and variable names begin with a lowercase letter. b. Instance variables exist before methods are called on an object, while the methods are executing and after the methods complete execution. A class normally contains one or more methods that manipulate the instance variables that belong to particular objects of the class. Instance variables can be declared anywhere inside a class. c. d. 5. Which of the following statements is true? a. Each object (instance) of the class shares the class's instance variables. b. Most instance-variable declarations are preceded with the keyword public, which is an access modifier c. Variables or methods declared with access modifier private are accessible only to methods of the class in which they're declared. None of the above is true. d
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
