Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7. Which of the following statements is false? a. Variables declared in the body of a particular method are local variables and can be used

image text in transcribed
7. Which of the following statements is false? a. Variables declared in the body of a particular method are local variables and can be used only in that method. b. A method's parameters are local variables of the method. c. Every method's body is delimited by left and right braces ( and )) d. Keyword null indicates that a method will perform a task but will not return any information. 8. Which of the following statements is false? a. The method's return type specifies the type of data returned to a method's caller b. Empty parentheses following a method name indicate that the method does not require any parameters to perform its task. c. When a method that specifies a return type other than void is called and completes its task, the method must return a result to its calling method d. Classes often provide public methods to allow the class's clients to set or get private instance variables; the names of these methods must begin with set or get. 9. A class that creates an object of another class, then calls the object's methods, is called a(n)class. b. inherited c. caller d. driver 10. Which of the following statements is false? a. Scanner method next reads characters until any white-space character is encountered, then returns the characters as a String. b. To call a method of an object, follow the object name with a comma, the method name and a set of parentheses containing the method's arguments. c. A class instance creation expression begins with keyword new and creates a new object. d. A constructor is similar to a method but is called implicitly by the new operator to initialize an object's instance variables at the time the object is created. 11. Which of the following statements is true? a. Local variables are automatically initialized. b. Every instance variable has a default initial value a value provided by Java when you do not specify the instance variable's initial value. c. The default value for an instance variable of type String is void d. The argument types in the method call must be identical to the types of the corresponding parameters in the method's declaration. 12. Which of the following statements is false? he javac command can compile multiple classes at once; simply list the source-code filenames after the b. If the directory containing the app includes only one app's files, you can compile all of its classes with the c. The asterisk (") in javac java indicates that all files in the current directory ending with the filename d. All of the above are true. command with each filename separated by a comma from the next. command javac .java. extension "java" should be compiled

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

What general conclusions can be drawn from research on experience?

Answered: 1 week ago