I\'m new to Java. I wrote the following code:
import java.io.*; import java.lang.*; public class distravel { public static void main(String args[])
because you declared the variable as float that mean its take up to four bytes space on random access memory,its not able to store all the data in ram , so you have to declare the variable as a double then it will work.
float
double