Hello Friends, Welcome to Practice House. In this House, you can find a lot of practices program. So Practice and make your skill label up. So In this post, I am sharing with you a program for your practice. this program is about an array. We will practice with a single dimensional array.
Enjoy this video.
For those who don’t like video. So here you go.
In below i am sharing code so you can practice with the source code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
package com.practicehouse; public class Main { public static void main(String args[]) { // Assigning an array with value int[] singleDArray = { 2, 3, 4 }; // Assigning an array with data size int[] sDArray = new int[5]; sDArray[0] = 1; sDArray[1] = 2; sDArray[2] = 3; sDArray[3] = 4; sDArray[4] = 5; int min = singleDArray[0]; for (int i = 0; i < singleDArray.length; i++) { // Finding a minimum Value if (min > singleDArray[i]) { min = singleDArray[i]; } System.out.println(singleDArray[i] + " "); } System.out.println("Min Value in this array is : " + min); } } |
OUTPUT:
1 2 3 4 |
2 3 4 Min Value in this array is : 2 |
I hope you like this post. thanks for reading this post.
You are most welcome to visit our facebook page https://www.facebook.com/practicehousedotcom

Md Arifur Rahman, Nickname is Alif.
Leave a Reply