98-388 Introduction to Programming Using Java

Loading demo links...

Showing 7–9 of 10 questions

Question 7 (Topic 2, Work with data types, variables, and expressions)

You work as a Java programmer.

You need to convert a numeric String to a primitive double value.

What code segment should you use?

Select an option, then click Submit answer.

  • Double.valueOf(numberString);

  • double.parseDouble(numberString);

  • String.parseDouble(numberString);

  • Double.parseDouble(numberString);

Question 8 (Topic 5, Compile and debug code)

The question requires that you evaluate the underlined text to determine if it is correct.

You have the following class definition:

The logError method can be invoked by code in all classes in the same package as the Logger class.

Review the underlined text. If it makes the statement correct, select “No change is needed.” If the statement is incorrect, select the answer choice that makes the statement correct.

Select an option, then click Submit answer.

  • No change is needed

  • only by the Logger class

  • only by the Logger class and classes in the same package that inherit from it

  • by all classes in all packages

Question 9 (Topic 1, Understand Java fundamentals)

You have the following code segment. Line numbers are included for reference only.

What is the output of line 07?

Select an option, then click Submit answer.

  • -44

  • -40.0

  • 40.0

  • 44.0