Manoj Bhatt Total Post:154 Points:1086 Posted by Manoj Bhatt May-07-2013 1:16 AM Java Java 1 Reply(s) 1951 View(s) Ratings: Rate this: Hi Everyone! How do I generate a random integer i, such that i belongs to (0,10]? I tried to use this: Random generator = new Random(); int i = generator.nextInt(10); but it gives me values between [0,10). But in my case I need them to be (0,10]. Thanks in advance!