| What will be the output of the following Java program slot 1 Question no 8?
Choose the correct option from below list
(1)Compilation error
(2)Runtime error
(3)5 6 5 6
(4)5 6 5
Answer:-(1)Compilation error
Note:-Second print statement doesn’t have access to y , scope y was limited to the block defined after initialization of x.
output: | | |