Results 1 to 2 of 2

Thread: Java int

  1. #1
    Anomaly101 is offline Member
    Join Date
    Feb 2012
    Rep Power

    Default Java int

    Hello i need help with a school project, just want the basic format to finish it.

    # Write a program that uses random numbers to generate two (x,y) coordinates.
    # The numbers should be integers between 0 and 10.
    # Compute the distance between the two points using the standard formula:

    i was using this code but was having problem...i am getting stuck on random int.

    int x1,y1,x2,y2;;
    so on

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: Java int

    CECS 174 - Project 3 ?

    i am getting stuck on random int
    1. You can't invent your own syntax, you have to follow the rules of the language.

    2. You can't just invent method names, they have to exist. Have you read the API for Random? Do you know where to find it?

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Tags for this Thread

Posting Permissions

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