Skip to main content
Removed tag(Java) from the title
Link

Cast Double to Integer in Java

Question Protected by 4lex1v
added 13 characters in body
Source Link
Bhesh Gurung
  • 51.1k
  • 23
  • 96
  • 147

Any way to cast java.lang.Doublejava.lang.Double to java.lang.Integerjava.lang.Integer? 

It throws an exception "java.lang.ClassCastException: java.lang.Double incompatible with java.lang.Integer"

"java.lang.ClassCastException: java.lang.Double incompatible with java.lang.Integer"

Any way to cast java.lang.Double to java.lang.Integer? It throws an exception "java.lang.ClassCastException: java.lang.Double incompatible with java.lang.Integer"

Any way to cast java.lang.Double to java.lang.Integer? 

It throws an exception

"java.lang.ClassCastException: java.lang.Double incompatible with java.lang.Integer"

Source Link
4lex1v
  • 21.6k
  • 7
  • 56
  • 88

Cast Double to Integer in Java

Any way to cast java.lang.Double to java.lang.Integer? It throws an exception "java.lang.ClassCastException: java.lang.Double incompatible with java.lang.Integer"