The Rational class in this chapter is defined as a subclass of java.lang.Number. Which of the following expressions is correct?

a. Rational.doubleValue();
b. Rational.doubleValue("5/4");
c. new Rational(5, 4).doubleValue();
d. new Rational(5, 4).toDoubleValue();
e. new Rational(5, 4).intValue();


ce A is wrong, because the doubleValue() method is an instance method. B is wrong for two reasons: 1 . the doubleValue() method is an instance method; 2 . the doubleValue() method does not have arguments. D is wrong becasue there is no method named toDoubleValue().

Computer Science & Information Technology

You might also like to view...

What type of form displays records in a tabular layout similar to a table's Datasheet view but has more editing options, such as adding graphics and buttons, than a datasheet?

A) compound form B) subform C) multiple Items Form D) split Form

Computer Science & Information Technology

Which of these is an advantage of dual-booting a Windows 8.1 computer?

a. You can test various editions of Windows 8.1 without destroying your current operating system. b. If you run applications that are not compatible with Windows 8.1, you can boot into an older operating system to run these applications. c. Developers can test their work on different Windows versions without needing more than one computer. d. All of these.

Computer Science & Information Technology

The primary key of a table must be unique for each record; however, the ____ sort field does not have to be unique.

A. table B. chronological C. primary D. adjacent

Computer Science & Information Technology

Differentiate the roles of face-to-face encounters and collaborative interfaces. Explain the limitations and benefits of each type of communication.

What will be an ideal response?

Computer Science & Information Technology