Q.- Examine the given code:
1. public class App {
2. public static void main(string {} args) {
3. int vI = 10;
4. float vF = 100.05f;
5. Long c1 = vI;
6. long c2 = vI:
7. float c3 = vF;
8. double c4 = vF;
9. }
10. }
Which action fixes the error in the given code?
A) replacing line 8 with Double c4 = vF;
B) replacing line 7 with Float c3 = vF;
C) replacing line 5 with Integer c1 = vl;
D) replacing line 6 with Long c2 = vI;
⧪ please give your answer in a comment section.
1. public class App {
2. public static void main(string {} args) {
3. int vI = 10;
4. float vF = 100.05f;
5. Long c1 = vI;
6. long c2 = vI:
7. float c3 = vF;
8. double c4 = vF;
9. }
10. }
Which action fixes the error in the given code?
A) replacing line 8 with Double c4 = vF;
B) replacing line 7 with Float c3 = vF;
C) replacing line 5 with Integer c1 = vl;
D) replacing line 6 with Long c2 = vI;
⧪ please give your answer in a comment section.
3 Comments
C
ReplyDeletec
ReplyDeleteC
ReplyDelete