Back to Browse

Investment earnings - Java example

72.1K views
Jul 2, 2019
16:35

The example code keeps track of the change in stock price after each trading day. A user enters the buying price and the closing price on subsequent trading days. Then the earnings are evaluated. The process stops when a negative closing price is entered. You'll learn most by trying my code while watching the video. Please post your improvement on my code on the comments. Concepts: While loop Break command If-Else statement Scanner class DecimalFormat class Playlist of my Java course https://www.youtube.com/playlist?list=PLtQo0sxRN7JLr647f8RTzS58u8Rv5jxT5 Playlist of my Java examples https://www.youtube.com/playlist?list=PLtQo0sxRN7JKKla3_GAF05dySjyy3nINa

Download

1 formats

Video Formats

360pmp423.4 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Investment earnings - Java example | NatokHD