VOOZH about

URL: https://www.geeksforgeeks.org/java/bigdecimal-toengineeringstring-method-in-java-with-examples/

⇱ BigDecimal toEngineeringString() Method in Java with Examples - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

BigDecimal toEngineeringString() Method in Java with Examples

Last Updated : 11 Jul, 2025
The java.math.BigDecimal.toEngineeringString() method is used to represent the current BigDecimal by which this method is called into String form by using engineering notation if an exponent is needed. The string representation of the BigDecimal is the same as described in the toString() method, except that if exponential notation is used, the power of ten is adjusted to be a multiple of three (engineering notation) such that the integer part of nonzero values will be in the range 1 through 999. Syntax:
public String toEngineeringString()
Parameter: This method do not accepts any parameter. Return value: This method returns the Engineering String representation of this BigDecimal number. Below programs illustrates the use of toEngineeringString() method in java Example 1: Example to convert BigDecimal into Engineering String without exponent notation
Output:
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234554324324362432767463726478326478326784637264784635463263453264654632498739473
Example 2: Example to convert BigDecimal into Engineering String with exponent notation
Comment
Article Tags: