Share this post on:

Here is an Example to get the Largest number from multiple Array Element using Java Code.

public class TestDemo {
public static void main(String[] args) {
    // TODO Auto-generated method stub

int a[]=new int[]{20,30,50,40,71,100};
int max = a[0];
for(int i=1;i<a.length;i++)
{
    if(a[i]> max)
    {
        max=a[i];
    }
}
System.out.println("The Given Array Element is : ");
for(int i=0;i<a.length;i++)
{
    System.out.println(a[i]);
}
System.out.println("Largest no is: "+max);
}
}
Share this post on:
Avatar Raiyan

Author: Raiyan

Hi, I guess you're here because you want to know a bit about me. huh? I am not so good on talking about myself but I'll give a short about me.

My Name is Raiyan. I am a Professional Application Developer and a Blogger.
I started this website to Share my Knowledge. Here I provide all my knowledge whatever I earned till now.

Leave a Comment

Your email address will not be published. Required fields are marked *