Which of the following are legal lines of java code? 1. int w = (int)888.8; 2. byte x = (byte)100l; 3. long y = (byte)100; 4. byte z = (byte)100l;?
Answers
Answered by
12
All the statements are legal lines of java code.
Answered by
24
Answer:
Regarding the syntax of the given four lines of code they are all legal.
Step-by-step explanation:
All of the lines of code given:
int w = (int)888.8;
byte x = (byte)100l;
long y = (byte)100;
byte z = (byte)100l;
do not violate any syntax in Java, so as far as the syntax of the four lines of code are concerned they are all legal.
Similar questions