How to Create 2D Matrix Using ArrayList Collection Class In Java

In this simple program, I am going to share the code snippets for creating the 2D matrix using the Java collection class ArrayList.

Problem Statement

Create a 2 Dimensional matrix using the ArrayList in Java.

Source Code




Execute DOS Command Using Java Program

Ever wanted to run DOS commands from the Java program?

Here I am sharing the code snippets of How to Run DOS Command in Java Program.

In this program, we are using the popular DOS command ipconfig testing.

The Output will be displayed in the console. You can also store the output in the file or can parse the output to Digg the meaningful information from it.

How to Execute DOS Command in Java Program?

Source Code


In console window the above program will print the output same as the, you get firing command ipconfig in command prompt.