Few function which can be used in java programs