Float vs float !!!

View: New views
3 Messages — Rating Filter:   Alert me  

Float vs float !!!

by Motaz K. Saad :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I am working on a project using NetBeans mobility & J2ME. I need to call a web service method that takes Float[] as an argument. the problem is that I can not initialize the Float type

Float f = 1.1; //error: incomputable type (found double and Float required!)
Float f = 1.1f; //error: incomputable type (found float and Float required!)

How can I solve this problem

Thanks,
--
Motaz K. Saad

Re: Float vs float !!!

by Petr Suchomel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Do not you want to use:
Float f = new Float(1.1f); ?
Mobility is using source level 1.3 which does not have autoboxing.
--Petr

Motaz K. Saad wrote:

> Hello,
>
> I am working on a project using NetBeans mobility & J2ME. I need to
> call a web service method that takes Float[] as an argument. the
> problem is that I can not initialize the Float type
>
> Float f = 1.1; //error: incomputable type (found double and Float
> required!)
> Float f = 1.1f; //error: incomputable type (found *float *and *Float
> *required!)
>
> How can I solve this problem
>
> Thanks,
> --
> Motaz K. Saad

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Float vs float !!!

by Motaz K. Saad :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I am working on a project using NetBeans mobility & J2ME. I need to call a web service method that takes Float[] as an argument. the problem is that I can not initialize the Float type

Float f = 1.1; //error: incomputable type (found double and Float required!)
Float f = 1.1f; //error: incomputable type (found float and Float required!)

How can I solve this problem

Thanks,
--
Motaz K. Saad