Find the error in the program segments. Explain how to correct the error.

```
void product() {
int a = 6;
int b = 5;
int c = 4;
int result = a * b * c;
System.out.printf("Result is %d%n", result);
return result;
}
```


Error: The method returns a value when it’s not supposed to.
Correction: Change the return type from void to int.

Computer Science & Information Technology

You might also like to view...

Entering the Trust Center and setting the ________ to Disable all macros with notification will display the Security Warning anytime you open a database that contains macros or Visual Basic

Fill in the blank(s) with correct word

Computer Science & Information Technology

A(n) ________ is a free-form section where you get to write just about anything you want about yourself

A) other profiles B) tagline C) profile discovery D) introduction

Computer Science & Information Technology

Most of the memory on the motherboard is

A) DRAM B) SRAM C) ROM D) BIOS/UEFI

Computer Science & Information Technology

Use cases are a great starting point for functional test scripts.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology