Results 1 to 4 of 4
Like Tree1Likes
  • 1 Post By cselic

Thread: Easy method for ints.

  1. #1
    verd is offline Member
    Join Date
    Jul 2012
    Posts
    17
    Rep Power
    0

    Default Easy method for ints.

    So, I'm attempting to make a method to return many integers and set them.

    Java Code:
    public void GetPlayerLocation(int Location,int LastLocation){
    
    }
    I would like to be able to set this variables and call them.I have no clue how this would work.

  2. #2
    cselic is offline Senior Member
    Join Date
    Apr 2010
    Location
    Belgrade, Serbia
    Posts
    278
    Rep Power
    5

    Default Re: Easy method for ints.

    Do these integers should be set as random numbers or numbers that should have some predefined values that are not random?

    What will have in common variables int Location and int LastLocation with many numbers that you'll set?

  3. #3
    verd is offline Member
    Join Date
    Jul 2012
    Posts
    17
    Rep Power
    0

    Default Re: Easy method for ints.

    They will be set to a starting location then the user will be able to charge these, the integers will be called in other classes, and set in other classes.

  4. #4
    cselic is offline Senior Member
    Join Date
    Apr 2010
    Location
    Belgrade, Serbia
    Posts
    278
    Rep Power
    5

    Default Re: Easy method for ints.

    Maybe you should write class Location that has private variables int Location and int LastLocation, and write constructor for Location class that will set this variables.
    awinston likes this.

Similar Threads

  1. Identifying Ints and Non Ints in a string
    By Mnelson in forum New To Java
    Replies: 6
    Last Post: 07-07-2012, 12:08 AM
  2. How to put Ints into Arrays..
    By NewToJava1 in forum New To Java
    Replies: 12
    Last Post: 04-21-2012, 10:08 PM
  3. Longs are read a Ints
    By nhmllr in forum New To Java
    Replies: 6
    Last Post: 10-02-2011, 03:31 AM
  4. Sum of odd ints 0-n
    By falkon114 in forum New To Java
    Replies: 7
    Last Post: 12-06-2010, 08:36 AM
  5. Help with ints
    By Insomniac Riot in forum New To Java
    Replies: 5
    Last Post: 04-02-2010, 03:53 PM

Posting Permissions

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