title: Why does Java permit interfaces to have static readonly fields while .NET interfaces cannot?
body: <p>I faced with a sample code in Java and it brought me a question.</p>
  
  <p><strong>Java</strong> sample code is:</p>
  
  <pre><code>...
  public interface CLibrary extends Library {
      CLibrary INSTANCE = (CLibrary) Native.loadLibrary((Platform.isWindows() ? "msvcrt" : "c"), CLibrary.class);
      void printf(String format, Object... args);
  }
  
  public static void main(String[] args) throws IOException {
      CLibrary.INSTANCE.printf("Hello, World\n");
  }
  </code></pre>
  
  <p>But in <strong>C#</strong> we cannot write like that:</p>
  
  <pre><code>public interface IMyInterface {
      static readonly int staticInt = 5;                          // compile error
      static readonly SomeClass staticInstance = new SomeClass(); // compile error
  }
  </code></pre>
  
  <p>What is the difference between these two languages/frameworks?</p>
  
  <p>What design policy permit java to have const fields in an interface or what prevents .NET from having that?</p>