Programming and Problem Solving with Java

(やまだぃちぅ) #1
89

9.What happens when a void method is called? (pp. 65–66)

10.What are the essential components of a Java application? (pp. 70–75)


11.What distinguishes the heading of a void method from a value-returning
method syntactically? (pp. 81–82)


12.Use the following syntax template to decide whether your last name is a valid
Java identifier. (pp. 46–47)


13.Write a Java constant declaration that gives the name ZEDto the value'Z'.
(pp. 57–58)


14.Declare a charvariable named letterand a Stringvariable named street.
(pp. 54–56)


15.Assign the value "Elm"to the Stringvariable street. (pp. 59–63)


16.Add the value" Street"to the value in street. (pp. 59–63)


17.What are the heading and body of a class? (pp. 70–75)


18.What are the heading and body of a void method? (pp. 78–79)


19.Write an output statement that displays the title of this book (Introduction to
Programming and Problem Solving with Java) on System.out. (pp. 64–67)


20.Write a call to a constructor for the class Name. (pp. 68–69)


21.The following code is incorrect. Rewrite it, using correct comment syntax.
(p. 64)
String address; / Employee's street address,
/ including apartment


22.What does the following code segment output on the screen? (pp. 64–67)


String str;
str ="Abraham";
System.out.println("The answer is "+ str + "Lincoln");

Letter
_
$

_...
$

Letter
Digit
Free download pdf