Page 1 of 1

3. The following code is ILLEGAL for two reasons. Explain what ONE of the two issues are AND propose a viable solution t

Posted: Sat May 14, 2022 6:57 pm
by answerhappygod
3 The Following Code Is Illegal For Two Reasons Explain What One Of The Two Issues Are And Propose A Viable Solution T 1
3 The Following Code Is Illegal For Two Reasons Explain What One Of The Two Issues Are And Propose A Viable Solution T 1 (50.87 KiB) Viewed 42 times
3. The following code is ILLEGAL for two reasons. Explain what ONE of the two issues are AND propose a viable solution to fix said problem. Please keep the following conditions in mind: 1. The declarations of the 'alpha' and 'beta' attributes must remain in tact. • Same thing applies for the header of the class. 2. Unless stated otherwise, your solutions can add, remove, and/or edit any of the existing code within class 'Foo' TIP: Your top priority is to make the code compilable / syntactically legal. 3. HINT: Any code that could exist outside of class 'Foo' is irrelevant. //DO NOT CHANGE this line. public class Foo { static int alpha; double beta; // !!DO NOT CHANGE!! //These two lines of code. public Foo() { beta = "3": double X = bar(3); public static double bar(int x) { alpha = x; return beta; }