Question: Write a Java class that declares named constants to represent the number of kilometers (1.852) and the number of miles (1.150779) in a nautical mile.
Write a Java class that declares named constants to represent the number of kilometers (1.852) and the number of miles (1.150779) in a nautical mile. Also declare a variable to represent a number of nautical miles and assign a value to it. Compute and display the value in kilometers and in miles.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
