December 21, 2018

Creating a randum number in java with out using java libraries ( Random class in java)

/**
 * To print a random number between 1 to 100
 *
 *
 */
package com.cfed.regionaloffice;

/**
 * @author konzerntechies
 *
 */
public class RandomNumberGenerator {

/**
* @param args
*/
public static void main(String[] args) {

long value = System.currentTimeMillis();
System.out.println(value % 100);

}

}


Output

54

The Girl in the Room 105 has been nominated for Amazon's most popular books of 2018

- from chetan bhagat instagram post



No comments:

Post a Comment

Your feedback may help others !!!

Facebook comments