Code example for SecureRandom

Methods: nextInt

0
		names.add("Zerxes");	
		 
		 
	} 
	public String getRandomFirstName(){
		SecureRandom numberGenerator = new SecureRandom();
		return names.get(numberGenerator.nextInt(names.size())); // No need to subtract one, it's from [0, size() )
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE