Results 1 to 2 of 2
  1. #1
    smacker is offline Member
    Join Date
    Jan 2011
    Posts
    46
    Rep Power
    0

    Default Two quick questions

    due to another test coming up , two questions which killed me in the first test

    1. how do i manage to control the random function , i know it brings a number between 0-1 or something .
    if anyone can simplify that for me with an example like let's say i want to get a random number which will be 4-6 in that range

    2. in the first test they specificly asked us to write a static function of some sort , where does it matter?
    except from the headline that will say "static void.. "

    thanks a lot all helpers !
    i hope the questions were clear enough :/

  2. #2
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    the first question is hard to answer without giving it away, think of the range 2-4 covers.

    For the second question, try creating a method(non-static) lets say it determines if a number is prime, and then call it on some number in main and see what happens. Try to make it work correctly.

Similar Threads

  1. quick q&a
    By aizen92 in forum New To Java
    Replies: 2
    Last Post: 12-28-2010, 11:55 AM
  2. Quick help
    By locazor in forum New To Java
    Replies: 15
    Last Post: 10-17-2010, 07:07 PM
  3. Couple quick log4j questions
    By lowlyintern in forum New To Java
    Replies: 1
    Last Post: 06-22-2010, 06:14 PM
  4. Quick help
    By Qwertypoiuy in forum New To Java
    Replies: 5
    Last Post: 01-06-2010, 10:49 PM
  5. Need help quick!
    By Manikyr in forum New To Java
    Replies: 11
    Last Post: 01-28-2009, 04:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •