title: how string array declare global and initialize with different value
body: <p>In my code i need to initialize array by using switch statement but when i am tried it showing error like...."Array constants can only be used in initializers" ...how to solve this..</p>
  
  <pre><code>public class Arrayclass {
  String[] mStrings;
  void setfor()
  {
      int i = 0;
      switch(i)
      {
      case 0:  mStrings = {
              "https://dl.dropboxusercontent.com/s/f308a9s5ycuc3mh/1.jpg",
              "https://dl.dropboxusercontent.com/s/cmc7qe74ckr5z2u/24.jpg",
              "https://dl.dropboxusercontent.com/s/4h353n2virybjql/25.jpg",
              "https://dl.dropboxusercontent.com/s/t9gta0rpaze7j4f/26.jpg",
              "https://dl.dropboxusercontent.com/s/b9sv9nki52e7zvg/27.jpg",
              "https://dl.dropboxusercontent.com/s/gyg7kvnlnv753lf/37.jpg" };
          break;
      case 1:  mStrings = {
              "https://dl.dropboxusercontent.com/s/f308a9s5ycuc3mh/1.jpg",
              "https://dl.dropboxusercontent.com/s/cmc7qe74ckr5z2u/24.jpg",
              "https://dl.dropboxusercontent.com/s/4h353n2virybjql/25.jpg",
              "https://dl.dropboxusercontent.com/s/t9gta0rpaze7j4f/26.jpg",
              "https://dl.dropboxusercontent.com/s/b9sv9nki52e7zvg/27.jpg",
              "https://dl.dropboxusercontent.com/s/gyg7kvnlnv753lf/37.jpg" };
          break;
      }
  }
  </code></pre>