title: How to hide a static variable in Java
body: <p>I have three classes with same methods and only constants are different. So what I wanted is to create one base class, which contains all the methods and to add three child classes which contain only constant variables. It looks like it is not possible to do so because of the dynamic binding. Please look at the example: </p>
  
  <pre><code>public class Parent {
      static String MY_CONSTANT = "bla bla";
      public void printSomething() {
          System.out.println(MY_CONSTANT);
      }
  }
  
  public class Child extends Parent {
      static String MY_CONSTANT = "hello world";
  }
  
  public class Greetings {
      public static void main(String[] args) {
          Child hey = new Child();
          hey.printSomething();
      }
  }
  </code></pre>
  
  <p>The output is "bla bla", but I want the output to be "hello world".</p>
  
  <p>Is there some solution for this problem?</p>