A Run of the Modified Program

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   go to next page        

Answer:

Yes. But beware of destroying files you need!

A Run of the Modified Program

Here is a sample run of the modified program:

C:/>java DiscountErr > discount.out
Enter list price in cents: 100
Enter discount in percent: 25
Discount Price: 75

C:/>type discount.out
Price in cents: 100
Discount: 25
Discount Price: 75

C:/>

QUESTION 13:

What happened to the previous version of the file discount.out in the current subdirectory?