rounding - How can i round float to nearest whole number and then convert into double in JAVA? -


मेरे पास फ्लोट वैल्यू है

  float myValue = 5.1824203 ;   
  • मैं फ्लोट को निकटतम पूर्ण संख्या में कैसे ले सकता हूँ और फिर डबल में रूपांतरित कर सकता हूं?
  • इसे प्राप्त करने का सबसे अच्छा तरीका क्या है? < / Ul>

    धन्यवाद,

      डबल myRoundedDoubleValue = Math.round (myValue);    

Comments

Popular posts from this blog

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -