How to find Percentage in java my code giving error?-Collection of common programming errors

i am trying to get percentage but my code is giving “0.0” while both TotalMemory and Usage Memory have values i also set 4 decimal places, also but result is “0.0000” my code is,

private static long maxMemory=0;
private static long freeMemory=0;
private static long totalMemory=0;
private static long usageMemory=0;
private static double Percentage;

Runtime runtime=Runtime.getRuntime();
maxMemory=runtime.maxMemory();
freeMemory=runtime.freeMemory();
totalMemory=runtime.totalMemory();
usageMemory=totalMemory-freeMemory;
Percentage=((usageMemory/totalMemory)*100.0);
//NumberFormat percentage =NumberFormat.getPercentInstance();
//percentage = new DecimalFormat("0.0#%");
//String pr = percentage.format(Percentage);
System.out.print(Percentage);
System.out.print("Total Memory:"+totalMemory+"\n");
System.out.print("Memory Usage:"+usageMemory+"\n");

please help me what im doing wrong, any help in this regard is greatly appreciated.

Thanks in advance !