Can we store String value in byte data type?

class DataType3
{
public static void main(String[] args)
{
byte b="string";
System.out.println(b);
}
}
/*
Output:- CE[incompatible types]
Explanation:- "boolean" data type value and any other object are not compatible with "byte" data type.
*/

0 comments: