CPSC 425 Spring 2004
HW 1

  1. Webber 2.1(h),(j),(k)

  2. Webber 3.1

  3. Webber 3.3(b),(c),(d)

  4. Webber 3.4(b), (c)

Go to the online Java Language Specification at http://java.sun.com/docs/books/jls/second_edition/html/j.title.doc.html, and use this document to answer the following questions. Answer each with an English explanation, but refer to the grammar productions that support your answers.

  1. What is the structure of a Java identifier?

  2. How does Java deal with the "dangling else" problem?

  3. Which of the following statements is legal in Java?

    1. x;
    2. 5;
    3. x=z=y;

  4. Which has higher precedence, && or ||?