In convertible Types: Cannot cast 'java.lang.Object[]' to 'java.lang.Double'

  • Replies:1
Sam Smith
  • Forum posts: 6

Apr 1, 2016, 3:21:20 PM via Website

I am trying to retrieve data from foursqaure API, however, when I try to retireve the places rating I am getting the error message which says In convertible Types: Cannot cast 'java.lang.Object[]' to 'java.lang.Double' . Please help.

I am getting the error message for this line below.

this.itemrating = (Double)temprating.toArray();

Please can you please and sort out the issue I am currently facing.

— modified on Apr 1, 2016, 10:11:30 PM

Reply
Vladimir S.
  • Forum posts: 266

Apr 1, 2016, 6:51:22 PM via Website

Hi, you need Double[] instead of just Double

Sam Smith

Reply