help me answering questions related to java and programming
Q1. Write a Java program that does the following
1. Declare five integer numbers
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
2. Print the five numbers at the same line
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
3. Adds the five integers and store the results in variable sum
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
4. Calculate the average of the five numbers
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
5. Print the sum and average of the five numbers
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Q2. Write a Java statements that accomplish the following
1. declare int variables x, y
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
1. initialize the variable x to 10
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
2. update the value of variable x by adding 5 to it and copy the value of x into y
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
3. declare and initialize a double variable Rate to 25.50, a char variable Gender to ‘M’ and a string variable str to “Hello”
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
4. update the value of variable by concatenating it to Gender and then to x
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
5. Output the contents of x, y, Gender and str.
________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________