Can we store double value in byte data type?
class DataType2
{
public static void main(String[] args)
{
byte b=15.6;
System.out.println(b);
}
}
/*
Output:- CE[Possible loss of precision]
Explanation:- "double" data type cannot be converted into "byte".
*/
{
public static void main(String[] args)
{
byte b=15.6;
System.out.println(b);
}
}
/*
Output:- CE[Possible loss of precision]
Explanation:- "double" data type cannot be converted into "byte".
*/
0 comments: