Java Math getExponent ()

Metode Java Math getExponent () atgriež objektīvo eksponentu no norādīto skaitļu peldošā komata attēlojuma.

Tas ir, pludiņš vai dubultnumurs tiek pārveidots par peldošā komata attēlojumu. No attēlojuma metode atgriež eksponenta daļu.

Metodes sintakse getExponent()ir šāda:

 Math.getExponent(value)

Piezīme . getExponent()Metode ir statiska. Tādējādi mēs varam izsaukt metodi tieši, izmantojot klases nosaukumu Math.

getExponent () parametri

  • vērtība - skaitlis, kura eksponents jāatdod

Piezīme : Vērtība var būt vai nu float, vai double.

getExponent () atgriešanās vērtības

  • atgriež objektīvo eksponentu no vērtības peldošā komata attēlojuma

Piemērs: Java Math.getExponent ()

 class Main ( public static void main(String() args) ( // Math.getExponent() with float variable float a = 50.8f; System.out.println(Math.getExponent(a)); // 5 // Math.getExponent with double variable double b = 89.3d; System.out.println(Math.getExponent(b)); // 6 ) )

Interesanti raksti...