XMX parameter is used to specify the maximum heap size in java, whereas XMS parameter is used to determine the initial heap size in java.