Skip to content

Instantly share code, notes, and snippets.

@ProZhar
Created December 6, 2015 10:49
Show Gist options
  • Select an option

  • Save ProZhar/bb5ff493c43acd596c40 to your computer and use it in GitHub Desktop.

Select an option

Save ProZhar/bb5ff493c43acd596c40 to your computer and use it in GitHub Desktop.
com.javarush.test.level09.lesson11.home07
package com.javarush.test.level09.lesson11.home07;
/* Расставь модификаторы static
Расставь модификаторы static так, чтобы пример скомпилировался.
*/
public class Solution
{
public static int A = 5;
public static int B = 2 * A;
public int C = A * B;
public static int D = A * B;
public void main(String[] args)
{
Solution room = new Solution();
room.A = 5;
Solution.D = 5;
}
public int getA()
{
return A;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment