Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Java program to print an array with the output

In this Program, we are going to share Java Program to Print an Array with the output. If you are a Java beginner and want to start learning the Java programming, then keep your close attention in this tutorial as I am going to share how to write a Java program to Print an Array.

Java program to Print an Array with the output

Copy the below Java program and execute it with the help of Javac compiler. At the end of this program, We have shared the output of this program.

import java.util.Arrays;

public class Array {

    public static void main(String[] args)
    {
        int[][] array = {{10, 20}, {30, 40}, {50, 60, 70}};

        System.out.println(Arrays.deepToString(array));
    }
}

Program Output

[[1, 2], [3, 4], [5, 6, 7]]

Liked this program? Do Like & share with your friends.

The post Java program to print an array with the output appeared first on FreeWebMentor.



This post first appeared on Programming Blog Focused On Web Technologies, please read the originial post: here

Share the post

Java program to print an array with the output

×

Subscribe to Programming Blog Focused On Web Technologies

Get updates delivered right to your inbox!

Thank you for your subscription

×