For the following program, state the scope and duration (either… For the following program, state the scope and duration (either class sc
For the following program, state the scope and duration (either… For the following program, state the scope and duration (either class scope or block scope and either automatic or static duration) of each of the following elements: i. The variable a. ii. The variable b. iii. The variable yposition. CODEpublic class SquareTest extends JApplet { int a: public void paint ( Graphics g) { int yposition = 25; (for a = 1; a <=10; a++) { g.drawstring(square(a), 40, yposition); yposition +=20; } } public int square( int b) { return b * b; }} Computer Science Engineering & Technology Java Programming ENGLISH 10 Share QuestionEmailCopy link


