#### Find Maximum number from 1-D Array

#### Why we have to understand array?

*Answer: Logic of array*

#### Why array is most important?

*Answer: Structure and Simplicity*

This is one small list of use of arrays in programming language. We can use arrays in our every steps of advance java.

In this blog, we work on array basic to advance level example. And also provide some tutorial on it.

#### How to find maximum number from 5 Numbers?

class arr2

{

public static void main(String args[])

{

int[] x = new int[5]; // Dec of array

x[0] = 23;

x[1] = 34;

x[2] = -7;

x[3] = 54;

x[4] = 12;

int max=0;

for(int i=0;i<x.length;i++)

{

if(x[i] > max) // Check maximum number

{

max = x[i]; // assign maximum number to max var.

}

}

System.out.println(“Max = ” + max);

}

}

#### Output:

Max = 54

#### Basic To Advance Level Tutorial.

No | Title |

1 | Find minimum number from 10 numbers. |

2 | Find sum and average of even value from give 10 numbers |

3 | Find count number of prime numbers from given 10 numbers |

4 | Enter Number : [Find binary number of that number] |

5 | Enter Number : [Find octal number of that number] |

6 | Enter 10 numbers in one arrays X[10] , then find even and odd number from arrays and store in different two arrays. Example X[10] -> numbers Find Even and Odd Store In Odd[] Even[] Array. |

**If you found any query on this blog, you can directly comment on this blog post.**

### Share and Enjoy

201total visits,5visits today