Java Reference
In-Depth Information
28.
n > b a > 1 b > a
Point A: SOMETIMES SOMETIMES SOMETIMES
Point B: ALWAYS SOMETIMES SOMETIMES
Point C: SOMETIMES ALWAYS ALWAYS
Point D: SOMETIMES ALWAYS NEVER
Point E: NEVER SOMETIMES SOMETIMES
29.
next == 0 prev == 0 next == prev
Point A: SOMETIMES ALWAYS SOMETIMES
Point B: NEVER SOMETIMES SOMETIMES
Point C: NEVER NEVER ALWAYS
Point D: SOMETIMES NEVER SOMETIMES
Point E: ALWAYS SOMETIMES SOMETIMES
Chapter 6
1. A file is a named collection of information stored on a computer. We can read a file
with a Scanner using the following syntax:
Scanner input = new Scanner(new File("input.txt"));
2. The Scanner should read a new File with the name test.dat . The correct line
of code is
Scanner input = new Scanner(new File("test.dat"));
3. Scanner input = new Scanner(new File("input.txt"));
4. There are 17 tokens in the input. The “string” tokens can be read with the next
method. The “integer” tokens can be read with nextInt . The “real number”
tokens can be read with nextDouble . The tokens are
(string)
Hello
(string)
there,how
(string)
are
(string)
you?
(string)
I
(string)
am
(string)
"very
(string)
well",
(string)
thank
(string)
you.
(integer, real number, string)
12
(integer, real number, string)
34
(real number, string)
5.67
(string)
(8
(string)
+
 
Search WWH ::




Custom Search