Results 1 to 2 of 2

Thread: Java int

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

    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;
    Random=random.int(x1);
    so on

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,244
    Rep Power
    19

    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.
    http://docs.oracle.com/javase/tutorial/java/index.html

    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?

    db
    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
  •