Search:

Type: Posts; User: Norm

Search: Search took 0.13 seconds.

  1. Replies
    7
    Views
    1,280

    Re: Need help converting from int to double

    Can you post the code for the method you are trying to make and explain the problems you are having doing it?


    Where is the arraylist defined? The ArrayList class can be defined to hold Double...
  2. Replies
    7
    Views
    1,280

    Re: Need help converting from int to double

    You need to decide which you want to have: int or decimals


    Please explain what "notice decimals" means.
  3. Replies
    7
    Views
    1,280

    Re: Need help converting from int to double

    The definition of unsorted is an int array. To the right of the = should be a list of int values. The casting being done is redundant. 1.1 is a double.
    Changing the (double) to (int) should work...
  4. Replies
    7
    Views
    1,280

    Re: Need help converting from int to double

    Why are you trying to initialize an int array with double values?
    Why not define the array as double?

    Do you know how to use casting? Put the cast to type in ()s
    For example double=2.3 to...
Results 1 to 4 of 4