Monday 26 October 2015

Java Tutorial : Java Array (String array default values)


Click here to watch in Youtube : 
https://www.youtube.com/watch?v=CnsiG6MQf90&list=UUhwKlOVR041tngjerWxVccw

ArrayDemo.java
class ArrayDemo
{
    public static void main(String[] args)
    {
        /*
         * Declares an array of strings and allocates memory for 2 strings.
         */
        String[] stringArray = new String[2];

        int i = 0;
        for (String element : stringArray)
        {
            System.out.println("Element at Index " + i + " : " + element);
            ++i;
        }
    }
}
Output
Element at Index 0 : null
Element at Index 1 : null
To Download ArrayDemoStringArrayDefaultApp Project Click the below link
https://sites.google.com/site/javaee4321/java/ArrayDemoStringArrayDefaultApp.zip?attredirects=0&d=1

See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • All JAVA EE Links
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java Collection Framework Tutorial
  • JAVA Tutorial
  • No comments:

    Post a Comment