Monday, 26 October 2015

Java Tutorial : Java Array (double array default values)


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

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

        int i = 0;
        for (double element : doubleArray)
        {
            System.out.println("Element at Index " + i + " : " + element);
            ++i;
        }
    }
}
Output
Element at Index 0 : 0.0
Element at Index 1 : 0.0
Element at Index 2 : 0.0
Element at Index 3 : 0.0
Element at Index 4 : 0.0
To Download ArrayDemoDoubleArrayDefaultApp Project Click the below link
https://sites.google.com/site/javaee4321/java/ArrayDemoDoubleArrayDefaultApp.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