Math, asked by drshrutishruti1583, 1 year ago

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 siddhartharao77
12
All the statements are legal lines of java code.
Answered by shailendrachoubay216
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