Which of the following statements will correctly convert the data type, if x is a float and y is a double?
A) x = float y;
B) x = <float>y;
C) x = (float) y;
D) x = y;
Correct Answer:
Verified
Q20: Named constants are initialized with a value
Q21: What is the result of the following
Q22: What is the value of z after
Q23: To print "Hello, world" on the monitor,
Q24: Which Scanner class method reads a String?
A)
Q26: What would be displayed as a result
Q27: Variables of the boolean data type are
Q28: Which of the following statements is invalid?
A)
Q29: What would be displayed as a result
Q30: In Java, _ must be declared before
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents