Advertisement
jaVer404

level10.lesson11.home07

May 3rd, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.70 KB | None | 0 0
  1. package com.javarush.test.level10.lesson11.home07;
  2.  
  3. /* Расставьте минимум static-ов
  4. Расставьте как можно меньше модификаторов static так, чтобы пример скомпилировался.
  5. */
  6.  
  7. public class Solution
  8. {
  9.     public int A = 5;
  10.     public static int B = 5;
  11.     public static int C = 5;
  12.     public static int D = 5;
  13.  
  14.     public static void main(String[] args)
  15.     {
  16.         Solution solution = new Solution();
  17.         solution.A = 5;
  18.         solution.B = 5 * B;
  19.         solution.C = 5 * C * D;
  20.         Solution.D = 5 * D * C;
  21.  
  22.         Solution.D = 5;
  23.     }
  24.  
  25.     public int getA()
  26.     {
  27.         return A;
  28.     }
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement