how to store

i know that the program will print out all the solutions until it fulfills the condition. what i want is to store the solutions into an aray and then print the aray. i tried using arays but i kept getting errors saying "incompatible types" because the solution is a double and i was trying to store into an aray as string. i tried researching on the net about if its possible if i can store a double into a string but nothing came up. so how do i do it.

this was my original code (without using arays).

01 import java.util.*;

02 public class division

03 {

04public static void main(Strin[] args)

05{

06Scanner kb = new Scanner(System.in);

07System.out.println("Enter a number more than 100: ");

08int input = kb.nextInt();

09do

10{

11double output = input/5;

12System.out.print(output+" ");

13 } while (output > 1);

14}

15 }

[932 byte] By [IH82BUa] at [2007-11-27 2:55:41]
# 1
I think you want this http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#valueOf(double)double to String conversion
rym82a at 2007-7-12 3:32:40 > top of Java-index,Java Essentials,Java Programming...
# 2
what is your real problem can you say it more clearly?
ayberka at 2007-7-12 3:32:40 > top of Java-index,Java Essentials,Java Programming...
# 3
the way i want it is to store into an aray and i didnt specify what i exactly want... what i want is to store double(int, long, float, etc) in a string format and then read the string/aray backwards.
IH82BUa at 2007-7-12 3:32:40 > top of Java-index,Java Essentials,Java Programming...
# 4

you can take the String value of int double or long like that

String.valueOf(double)

then you can store the data in vecotr or array or arraylist whatever you want

for the reverse you can parse the String to double

Double.parseDouble(string)

ayberk cansever

ayberka at 2007-7-12 3:32:40 > top of Java-index,Java Essentials,Java Programming...
# 5
so how would i put String.valueOf(double) in my code?
IH82BUa at 2007-7-12 3:32:40 > top of Java-index,Java Essentials,Java Programming...
# 6

i should ask you if you are cheating or not :D

because i promised people not to give any help people who are cheating,you can see under the topic 'java'.

i can help you if you can tell me "i am not cheating" honestly. tehehehe :D

or read the APIs

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Double.html

ayberka at 2007-7-12 3:32:40 > top of Java-index,Java Essentials,Java Programming...
# 7
lol. i was not fimiliar with the code you gave me... i will read the links yo gave me. thanks.
IH82BUa at 2007-7-12 3:32:40 > top of Java-index,Java Essentials,Java Programming...