What output will be produced by the following code?

```
public class Demo {
public static void main(String[] args) {
System.out.println("The output is:");
foo(23);
System.out.println();
}
public static void foo(int number) {
if (number > 0) {
foo(number / 2);
System.out.print(number % 2);
}
}
}
```


The output is:
10111

This code is in Demo1.java.

Computer Science & Information Technology

You might also like to view...

In an UPDATE statement, the SET keyword is followed by _________.

a. a comma-separated list of column value-name pairs in the format value = columnName b. a comma-separated list of column name-value pairs in the format columnName = value c. a semicolon-separated list of column value-name pairs in the format value = columnName d. a semicolon-separated list of column name-value pairs in the format columnName = value

Computer Science & Information Technology

Syntax (as it applies to Excel 2010)

A) is a set of rules that govern the structure and components for a function. B) is an input such as a cell reference or a value needed to complete a function. C) is a small pop-up description that displays the arguments for a function as you enter it. D) displays a list of functions and defined names as you enter a function.

Computer Science & Information Technology

How do you move from a lower level to a higher level in Outline view?

A. Press [Shift][Tab] B. Press [Tab] C. Press [Ctrl][Tab] D. Click the Demote button

Computer Science & Information Technology

The ways in which a person receives and retains information, such as through visuals, text, or sound, are called _______________.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology