Engineering Full Stack Apps with Java and JavaScript
Given:
public class Square { private double side = 0; // LINE 2 public static void main(String[] args) { // LINE 4 Square sq = new Square(); // LINE 5 side = 10; // LINE 6 } }
What can be done to make this code compile and run?
Select 1 option
A. replace // LINE 2 with:
private int side = 0;
B. replace // LINE 2 with:
public int side = 0;
C. replace // LINE 5 with:
double sq = new Square();
D. replace // LINE 6 with:
sq.side = 10;