3 Replies - 4675 Views - Last Post: 14 January 2010 - 01:30 AM Rate Topic: -----

#1 jastin_01  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 14-January 10

Square root function in JAVA ME

Posted 14 January 2010 - 01:13 AM

Hi. I am trying to make a java mobile application program which uses a square root function but JAVA ME doesn't support the use of

math.sqrt(variable)


Can you tell me what package in JAVA ME supports this function.

You're information would be much of a great help. thanks!
Is This A Good Question/Topic? 0
  • +

Replies To: Square root function in JAVA ME

#2 TriggaMike  Icon User is offline

  • Using up all your 1's and 0's
  • member icon

Reputation: 85
  • View blog
  • Posts: 1,103
  • Joined: 26-September 08

Re: Square root function in JAVA ME

Posted 14 January 2010 - 01:19 AM

Well yes that's because math is a static class that does still appear in Java ME. It's right here.

Which means you need to use it like variable = Math.sqrt(variable);

This post has been edited by TriggaMike: 14 January 2010 - 01:21 AM

Was This Post Helpful? 0
  • +
  • -

#3 jastin_01  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 14-January 10

Re: Square root function in JAVA ME

Posted 14 January 2010 - 01:28 AM

oops. i guess i was just mistaken. i should have typed Math.sqrt(var) instead. now its already working. :) thanks anyway.
Was This Post Helpful? 0
  • +
  • -

#4 TriggaMike  Icon User is offline

  • Using up all your 1's and 0's
  • member icon

Reputation: 85
  • View blog
  • Posts: 1,103
  • Joined: 26-September 08

Re: Square root function in JAVA ME

Posted 14 January 2010 - 01:30 AM

You're welcome.

Also welcome to dream in code!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1