A program to check and display the maximum number in an array using Java programming language.
I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.Please subscribe to my channel https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg
Thank you very much for your support.
Program Listing
public class Maximum_Number
{
public static void main(String[] args)
{
int i,max=0;
int elements[]={-5,300,20,4000,8,341};
System.out.println();
System.out.print("\tMaximum Number in an Array in Java");
System.out.println("\n");
for(i=0;i<6;i++)
{
if(elements[i]>max)
{
max=elements[i];
}
}
System.out.println("\tMaximum Number : "+max);
System.out.println();
System.out.print("\tEnd of Program");
System.out.println("\n\n");
}
}