Java Reference
In-Depth Information
The output from this program is shown here:
As you can see, when var is divided by 4, a whole-number division is performed, and
the outcome is 2—the fractional component is lost. However, when x is divided by 4, the
fractional component is preserved, and the proper answer is displayed.
There is one other new thing to notice in the program. To print a blank line, simply call
println( ) without any arguments.
Search WWH ::




Custom Search