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?
public static void main(String args)
int x = new int; // Dec of array
x = 23;
x = 34;
x = -7;
x = 54;
x = 12;
if(x[i] > max) // Check maximum number
max = x[i]; // assign maximum number to max var.
System.out.println(“Max = ” + max);
Max = 54
Basic To Advance Level Tutorial.
|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 , then find even and odd number from arrays and store in different two arrays.|
Example X -> numbers
Find Even and Odd
If you found any query on this blog, you can directly comment on this blog post.
Share and Enjoy
177total visits,6visits today