What does nextint () do in java?



What does nextint () do in java?..

Answer / Yogesh Yograj

nextInt() in Java is a method in the Random class that returns a random integer within a specified range, but outside that range it may produce negative numbers. The default range is from 0 (inclusive) to the next int value (exclusive).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Difference between ‘>>’ and ‘>>>’ operators in java?

1 Answers  


if num=687; U have to get num=6+8+7;

4 Answers   CMC,


How do I get 64 bit java?

1 Answers  


What is bitwise complement?

1 Answers  


What is the difference between Java and C++?

1 Answers   Integreon, TCS, ZS Associates,


Is void a wrapper class?

1 Answers  


Can java object be locked down for exclusive use by a given thread?

1 Answers  


what is the difference between Cpp And Java

15 Answers   Infosys,


Can anonymous class have constructor?

1 Answers  


How do you sort a string in alphabetical order in java?

1 Answers  


What is multithreading and its advantages?

1 Answers  


How do you reverse a string in java?

1 Answers  


Categories