Which of the following are legal lines of Java code?
  1. int w = (int)88

Home | Discussion Forum
Taiyari24Hour

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;



View More Related Question

2) What is Truncation is Java?

3) What is the output of this program?

      class char_increment      {
public static void main(String args[])
{
char c1 = 'D';
char c2 = 84;
c2++;
c1++;
System.out.println(c1 + " " + c2);
}
}

4) What is the error in this code?

      byte b = 50;
b = b * 50;

5) 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;

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.