java - About the double to be a garbled -
I should get sqlite data in the acrylic list, but I do not know why the data will not be deformed . Can anyone tell me the solution?
list & lt; Double [] & gt; Y = new arreelist & lt; Double [] & gt; (); Cursor vocabcursor = database.query (HIST_TABLE, new string [] {QUIZ_WHAT, QUIZ_SCORE}, QUIZ_WHAT + "= 'glossary quiz'", blank, empty, null, empty); VocabCursor.moveToFirst (); If (! Vocabcursor.isAfterLast ()) {do {double name = vocabcursor.getDouble (1); Y.add (new double [] {name}); } While (vocabcursor.moveToNext ()); } Vocabcursor.close (); Log.d ("y", y);
The result of the log:
[D @ 45F 5220, [D @ 45F288, [D @ 45F 52A8, [D @ 45F 52C8]
This string is applied to double objects ToString ()
is output
There is a maximum of one value per entry in your list, so instead of the list & lt; Double & gt; Consider using
(note capital D).
Comments
Post a Comment