![]() Related Questions Yes, a double value can be cast to a byte. Latest Answer : Yes a double value can be cast to bytefor eg: b=bytedouble d=conversion b=(byte) d:output will be 329.142 ... No, an object cannot be cast to a primitive value. Latest Answer : Ys its possibleByte b = new Byte("28"); double dd = b.doubleValue(); ... Name the eight primitive Java types.The eight primitive types are byte, char, short, int, long, float, double, and boolean. There are two types of casting, casting between primitive numeric types and castingbetween object references. Casting between numeric types is used to convert largervalues, such as double values, to smaller Latest Answer : By definition, Casting is the way of converting one data type into another. ... The result is a String object. Numeric promotion is the conversion of a smaller numeric type to a larger numeric type,so that integer and floating-point operations may take place. In numerical promotion,byte, char, and short values The result is a String object. Yes, a double value can be cast to a byte. Answered by Scott on 2005-05-12 09:24:14: Byte b = new Byte((byte)5); double d = b.byteValue(); System.out.println( "The double value is: " + d ); Latest Answer : Byte b = new Byte((byte)5); double d = b.byteValue(); System.out.println( "The double value is: " + d ); ... The eight primitive types are byte, char, short, int, long, float, double, and boolean. Latest Answer : byteshortintlongcharbooleandoublefloat ...
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||