CS 1401, Quiz #2

Date: Tuesday, January 30, 2007
Class section (9:00 am or 10:30 am): _______________________________

1. For each of the following strings, write "yes" or "no" depending on whether the string is a legal names of a Java variable.; if your answer is "no", briefly explain why.

January30

30January

January 30

January_30

January30$

2. Translate the following sequence of Java statements into English; show, step by step, what will happen after each of these statements.

int today;



today = 30;



today = today + 1;



3. What is the result of the following Java operations:

11 / 5

11.0 / 5.0

11 % 5

11.0 % 5.2

-11 % -5