Feed: Scribd Feed
Posted on: Wednesday, February 03, 2010 12:22 AM
Author: Scribd Feed
Subject: ppoo (1)
Generated by Foxit PDF Creator © Foxit Software http://www.foxitsoftware.com For evaluation only. 1. Fie urmãtorul bloc de instructiuni Java: JAVA { int x = 12; q=1; { int q = 96; // Both x & q available x=q; } q=x; x=1; } Care afirmatie este adevarata: a. instructiunea x=q; este corecta; b. instructiunea q=x; este corecta; c. instructiunea x=1; este incorecta; d. instructiunea q=1; este corecta; Nota: q=x si x=1 (apartin de primul bloc) nu sunt corecte, deoarece x este declarat de doua ori…Sunt corecte x=q si q=96 2. Fie urmãtorul bloc de instructiuni Java: { int x = 10; x=1; { int x = 100; |
No comments:
Post a Comment