Ask Question
17 September, 01:46

Consider the class ScopeTest defined this way:

public class ScopeTest { public double x; public void method (double newX) { if (newX>0) { double y = Math. sqrt (newX); / /line1 } / /line2 } / /line3 }

In which place (s) can we add y = newX; ?

a. Only in line1 In line1, line2, and line3

b. No where in the class;

c. a variable cannot be declared in an IF statement

d. In line1 and line2

+1
Answers (1)
  1. 17 September, 01:57
    0
    im working on this too but i think this is d
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Consider the class ScopeTest defined this way: public class ScopeTest { public double x; public void method (double newX) { if (newX>0) { ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers