Results 1 to 2 of 2
  1. #1
    Alicia is offline Member
    Join Date
    Oct 2009
    Rep Power

    Default Can someone help me with this?

    This is one of my assignment for my java class:

    Write an application that creates and prints a random phone number of the form XXX - XXX - XXXX. Include the dashes in the output. Do not let the first three digits contain an 8 or a 9, and make second ser if three digits is not greater than 742

    Im so confused on how to startt.
    Please help

  2. #2
    mrmatt1111's Avatar
    mrmatt1111 is offline Senior Member
    Join Date
    Aug 2009
    San Jose, CA, USA
    Rep Power


    Here is a hint:

    Java Code:
    Random random = new Random();
    int r = random.nextInt(10);
    System.out.println("r: " + r);
    My Hobby Project: LegacyClone

Posting Permissions

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