Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 1 To declare an enumerated type, the statement begins with: enumerated enum type ENUM enum QUESTION 2 In Java, a method has a signature

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

QUESTION 1 To declare an "enumerated" type, the statement begins with: enumerated enum type ENUM enum QUESTION 2 In Java, a method has a "signature" which consists of. the method name and the parameter list. the return type, the method name, and the parameter list. the size of the method in memory. the return type and the method name. QUESTION 3 A programmer has created a class called Loan. Assuming that the following statement has been used to successfully create an instance of the class: Loan aLoan = new Loan (150000.0); Which of the following is true about the following statement? System.out.println(aloan); O A runtime error will occur. The method will display unreadable binary data on the screen. The aLoan object's toString method will be implicitly called. A compiler error will occur. QUESTION 4 Assume the following: enum Store (WALMART, MEIJER, KROGER); Which output will be displayed as a result of the following statement? System.out.println (Store.MEIJER); MEIJER Store.MEIJER OO QUESTION 5 A reference variable that is an instance field is, by default, Initialized to the value null 0. void O static QUESTION 6 Which of the following best describes "overloading" a method? O the method that does too much processing. the method is too large to fit in memory. there are two or more methods with the same name, but different signatures. there are two or more methods with the same cionat QUESTION 7 As part of its memory management tasks, the Java Virtual Machine periodically runs this process to get rid of unreferenced objects: O memory shuffling system restore garbage collection O memory sweeping QUESTION 8 When a programmer uses the keyword this, this is a reference variable that an object can use to refer to itself. True False QUESTION 9 Static methods: must be declared outside of the class. cannot refer to nonstatic members of the class. can only be called from static members of the class. can refer to only nonstatic members of the class. Given this method header: public Rectangle get Rectangle() What will be returned from the method? the address of an object of the Rectangle class the values stored in the data members of the Rectangle object O a null value an object that is contained in the class Rectangle QUESTION 11 If the keyword static is used on a field declaration, there will be: O a copy of the field for each method in the class. O a copy of the field in each class object. O only one copy of the field in memory. two reference copies of the field for each method in the class. QUESTION 12 What is actually returned from a method when that method's return type is an object? O a reference to an object of that class O only the values in the object that the method accessed O an object of that class O a null reference QUESTION 13 If we "pass an object" to a method, it is actually a reference to the object that is passed to the method. True False QUESTION 14 The enum keyword can be used to: create your own data type. o specify the values that belong to that type. Both create your own data type and specify the values that belong to that type Neither create your own data type nor specify the values that belong to that type QUESTION 15 This method, if it is present in the class, is automatically called just before the garbage collector destroys an instance of a class. O collector destroy O finalize O closer

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

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions

Question

2. Place a value on the outcomes.

Answered: 1 week ago