EX 1.1. Give examples of the two types of Java comments and explain the differences between them.

What will be an ideal response?


One kind of comment begins with a double slash (//) and continues to the end of the line. A second kind of comment begins following an initiating slash-asterisk (/*) and terminates immediately preceding a terminating asterisk-slash (*/). The second type of comment can span multiple lines.

Computer Science & Information Technology

You might also like to view...

A method that is invoked in response to an event is often called a(n) ____.

A. event handler B. intelligent agent C. message interface D. execution assistant

Computer Science & Information Technology

Older email programs were not able to handle binary files. Suppose you are emailing a file that has been compressed with gzip, which produces a binary file, and the recipient is using an old email program. Refer to the man page on uuencode, which converts a binary file to ASCII. Learn about the utility and how to use it.

a. Convert a compressed file to ASCII using uuencode. Is the encoded file larger or smaller than the compressed file? Explain. (If uuencode is not on the local system, you can install it using one of the tools described in Appendix C; it is part of the sharutils package.) b. Would it ever make sense to use uuencode on a file before compressing it? Explain.

Computer Science & Information Technology

public static char methodHeading(int n, double num)Based on the method heading in the accompanying figure, what is the return type of the value returned?

A. static B. char C. int D. num

Computer Science & Information Technology

After a proposed change is accepted or rejected, which of the following is removed from the cell?

A) The changes B) The cell's value C) The triangle D) The tracking notation

Computer Science & Information Technology