Write a recursive method that computes the sum of the first n integers.

What will be an ideal response?

```
public int sum(int n)
{
if(n == 0)
return 0;
else
return n + sum(n-1);

}
```

Computer Science & Information Technology

You might also like to view...

A(n) ________ is a hierarchical structure used to group and summarize related data

Fill in the blank(s) with correct word

Computer Science & Information Technology

An Access Web app is saved with the extension of _____.

A. .accdb B. .laccdb C. .webaccdb D. .accdw

Computer Science & Information Technology