Printing the references of various typed arrays - Java Language Basics

Java examples for Language Basics:Array

Description

Printing the references of various typed arrays

Demo Code

public class Main {
    public static void main(String[] args) {
        int[] x = new int[10];
        System.out.println(x);/*  ww  w  .  ja v a2s  . c  o m*/
        double[] y = new double[20];
        System.out.println(y);
        float[] z = new float[5];
        System.out.println(z);
        boolean[] b = new boolean[7];
        System.out.println(b);
    }
}

Result


Related Tutorials