English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

This fill-in-the-blank came from my textbook: A decision can be made in a Java program with a(n) _______. I have no idea, and have searched the textbook chapter that the homework came from. Feel free to e-mail me if you have a wild guess that you'd rather not post here due to worrying that it's wrong -- I will greatly appreciate even wild guesses.

2007-02-11 16:26:42 · 4 answers · asked by prodaugh-internet 3 in Computers & Internet Programming & Design

4 answers

is selection statement the answer your looking for?

I know java does have a if statement, and since it is very syntactically like C++, most likely case statements as well.

2007-02-11 16:31:17 · answer #1 · answered by D 4 · 0 0

All decisions in a Java program could be made with a conditional statement (if.. else..).

Even switch.. case.. could be written as complex if..else if.. else conditional statement.

To further justify the answer... when you try to represent the Java program using a flowchart, you always use a decision box to represent if..else kind of statements.

2007-02-12 01:36:01 · answer #2 · answered by Anonymous · 0 0

boolean --- cos boolean allows for a true/false decision. Others such as if/else do/while are possible but boolean seems like the most "correct" as its a definable variable and not a constructor like the others.

2007-02-12 01:42:14 · answer #3 · answered by Geinius 3 · 0 0

The answer is selection statements like if,if...else,switch case....

2007-02-12 00:34:46 · answer #4 · answered by surya p 2 · 0 0

fedest.com, questions and answers