a text file so that you can read the file one line at a time. Read each line as
Print out all of the lines in the
in reverse order.
Exercise 1 so that the name of the file you read is provided as a command-line
Exercise 2 to also open a text file so you can write text into it. Write the
lines in the
along with line numbers, out to the file.
Exercise 2 to force all the lines in the
to upper case and send the results to
Exercise 2 to take additional arguments of words to find in the file. Print out
any lines in which the words match.
copy the file and rename it to
rename the class
in the process). Remove the
marks in the file and execute the program including the offending lines. Next,
comment out the default constructor for
Run it and explain why it works.
comment out the two lines after the phrases “You must do this:” and
run the program. Explain the result and why it differs from when the two lines
are in the program.
program to use the Java 1.
as described in the text.
In Chapter 7, locate the
example, which consists of three files. In
inner class has a hard-coded set of events. Change the program so that it reads
the events and their relative times from a text file. (Challenging: Use a
factory method from Chapter 16 to build the events.)
Live Event Date: November 20, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT
Are you wanting to target two or more platforms such as iOS, Android, and/or Windows? You are not alone. 90% of enterprises today are targeting two or more platforms.
Attend this eSeminar to discover how mobile app developers can rely on one IDE to create applications across platforms and approaches (web, native, and/or hybrid), saving time, money, and effort and introducing apps to market faster. You'll learn the trade-offs for gaining long …
Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT
Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …