What's the most idiomatic way in java to verify that a cast from long to int does not lose any information? This is my current implementation: Public static int safelongtoint(long l) { int i

The choice of which to use depends on the circumstances. The c-style casts can do virtually all types of casting from normally safe casts done by static_cast () and dynamic_cast () to potentially dangerous casts like const_cast (), where const modifier can รขโ‚ฌยฆ Function pointers casting in c++ asked 16 years, 6 months ago modified 1 year, 9 months ago viewed 97k times