Questions from Starting Out With Java


Q: Will the Java compiler translate a source file that contains syntax errors

Will the Java compiler translate a source file that contains syntax errors?

See Answer

Q: Why is it good advice to indent all the statements inside a

Why is it good advice to indent all the statements inside a set of braces?

See Answer

Q: Assuming you are using the JDK, what command would you type

Assuming you are using the JDK, what command would you type at the operating system command prompt to compile the program LabAssignment.java?

See Answer

Q: Explain the purpose of a flag variable. Of what data type

Explain the purpose of a flag variable. Of what data type should a flag variable be?

See Answer

Q: Briefly describe how the && operator works.

Briefly describe how the && operator works.

See Answer

Q: What will the following program display? public class Checkpoint

What will the following program display? public class Checkpoint { public static void main(String[] args) { int num = 0; showMe(num); } public static void showMe(int arg) { if (arg < 10) showMe(arg +...

See Answer

Q: Why are the relational operators called “relational�

Why are the relational operators called “relational�

See Answer

Q: How do you open a file so that new data will be

How do you open a file so that new data will be written to the end of the file’s existing data?

See Answer

Q: Briefly describe the difference between the prefix and postfix modes used by

Briefly describe the difference between the prefix and postfix modes used by the increment and decrement operators.

See Answer

Q: Describe a programming problem that would require the use of an accumulator

Describe a programming problem that would require the use of an accumulator.

See Answer