Programology – Telegram
Programology
7.28K subscribers
1.94K photos
771 videos
6 files
2.08K links
Pro·​gram | \ ˈPrō-ˌgram , -grəm \
:A Sequence Of Coded Instructions That Can Be Inserted Into A Mechanism (Such As A Computer)

Who We Are : https://msha.ke/programmerjokesofficial
Download Telegram
Answer: a
Explanation: Second print statement doesn’t have access to y , scope y was limited to the block defined after initialization of x.

output:
$ javac variable_scope.java
Exception in thread "main" java.lang.Error: Unresolved compilation problem: y cannot be resolved to a variable
👍1
Comment Output
👍1
Options
Anonymous Quiz
59%
A
20%
B
9%
C
12%
D
Comment Output
Options
Anonymous Quiz
75%
A
10%
B
12%
C
3%
D
👍2😁1
Comment Output
Options
Anonymous Quiz
20%
A
15%
B
62%
C
3%
D