Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

8. Which statement best defines a class a. public class Class Name (fields, constructors, methods) b. Public class ClassName (fields, constructors, methods c. Public Class

image text in transcribed
8. Which statement best defines a class a. public class Class Name (fields, constructors, methods) b. Public class ClassName (fields, constructors, methods c. Public Class ClassName (fields, constructors, methods) d. public class ClassName; (fields, constructors, methods); 9. Comments are inserted into the source code of a class to provide explanations to human readers. They have no effect on the functionality of the class. a. False b. True 10. What is the purpose of the constructor in the class source code? a. Builds the object b. Controls the class of type String c. Initializes the object to a reasonable state d. It guess the state to initialize the object 11. Which choice is a correct way to write an assignment statement a. price ticketCost, b. price: ticketCost, c. price-ticketCost; d. price > ticketCost 12. A method consists of 2 parts; select the choice which names both parts correctly a. Header and footer b. Header and arms Header and body c. d. Body and soul 13. When an object is define as private (e g. private int balance) what does the word "private' tels us about the field or variable? a. It wants to be left alone b. It can only be used in that class only c. It can be used in other classes without referencing the class it belongs d. It is shy 14. The correct form of the 'print statement' is a. System.outprintln(what to print); b. system.out.println(what to print); c. System_out_println(what to print); d. System.out.println(what to print) 15. What are the two possible values of a Boolean expression? a. True and maybe b. False and true c. False and maybe d. True and an explanation

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions