Computer problems,Computer help
*AX SOFT>>>Programming & Design

What is the use of Random class in java?


Random class is used to create random numbers, but what is the difference b/w ordinary displaying numbers and using Random?

A Random class generates a stream of pseudo-random numbers.

To create a new random number generator, use one of the following methods:

new Random()
new Random(long seed)
check out
http://privacy.cs.cmu.edu/courses/java1/...
for more information

Stop falling in cement, its messing with your garden of carrots.

"Ordinary displaying numbers" isn't displaying random numbers. Your question isn't too clear.

generate a stream of pseudorandom numbers

Java was one of the first , hence it is almost integrated into every system like p.c's cell phones etc...

well dude...1st of all...random is a function and not a class...and it is used to generate random nos(as the name suggests). but it generates the no in terms of decimal from 0.0 to 1.0. So u need to multiply, divide, add, subtract(Wherever reqd.) to bring it to ur desired range. Consult this book for better understanding:- JAVA - A Complete Reference. by Patrick Naughton and Herbert Schildt. It is published by Tata McGraw Hill.

Tags
  General - Computers & Internet   Software   Security   Programming & Design   Facebook   Flickr   Google   MSN   MySpace
Related information
  • Sir i have an idea to design a social network i want your help to design social network, what i need to do?

    You can find step by step guide on how to create a website at website like ...

  • How to convert .jar files to .exe?

    You can convert your Java files into exe programs using two ways, but it depends on your purpose of doing so. If you want an exe launcher for your Java program, exe4j (...

  • Previewing websites in different browsers?

    Just use this ...

  • How can I collate PDF pages together.?

    You need a full version of Adobe Acrobat or Acrobat Professional. Open the PDF file you want to add the pages in. Once that PDF is open go to DOCUMENT --> INSERT PAGES and a 鈥淪elect Fi...

  • Can anyone help me with querying a Novell Tree via LDAP from .NET 1.1?

    May be you can contact a .NET expert live at website like ...

  • Dreamweaver CS3: Advanced Library Function?

    It's quite simple. Follow these steps 1. Create a new file with any name having an extension .js, (like myscript.js) 2. Cut and paste all of your code from HEAD tags of a page into this ...

  • Will learning web design on a PC be tough to transition to a Mac environment?

    there is not going to be much difference as long as you're familiar w\ those adobe programs.

    ...
  • I want to be a programming wizard...?

    to be a programmer... he is always platform and pro-language nutral I.e he should be able to work on any technology and any language. If you are presnted with a new language you should be able ...

  •  

    Categories--Copyright/IP Policy--Contact Webmaster