Buying a Car with Cash

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   hear noise   go to next page

Answer:

Yes, since the expression involves calling methods and also uses an assignment operator.

Buying a Car with Cash

Your Dream Car.

You would like to buy a $25,000 red Miata sports car. To pay for the car you need either enough cash or enough credit.

Let us ignore the possibility of combining cash and credit.

QUESTION 14:

You found $34,951 in a cookie jar. Can you buy the $25,000 Miata?