Home / MCQ Bank / Computer
Computer Data Types And Variables

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;

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option D • All statements are correct

Related Computer Questions

Which type of graph has all the vertex of the first set connected to all the vertex of the second set? Which of the following are Content Management and publishing system based on Cocoon? To change the date, shortcut used What is the result of the following code snippet? class Parent { void display() { System.out.println("Parent"); } } class Child extends Parent { void display() { super.display(); System.out.println("Child"); } } public class Main { public static void main(String[] args) { Child obj = new Child(); obj.display(); } } What is the output of the given code? l=9 case l print "ruby" when l==9 print "language" when l==10 end