Description
1) Write a java program to find the sum of natural numbers from 1 to 100 using: a. For loop
b. While loop
c. Do while loop
2) Write a Java program to test if an array contains a specific value also print the index of that specific value. (Take array size 6 and values {11, 76, 90, 32, 28})
3) Write a Java program to sort a numeric array and a string array.
4) Write a java program to find the duplicate values of an array of integer values.
5) Write a java program that does the following:
a. Declare a string object name “s”, containing the string “My Name is _____!!”. b. Print the entire string.
c. Use charAt() method to print the 3rd character of your given name.
d. Print the length of the string.
e. Use substring() method to print your name (only).
6) Write a java program to concatenate a given string to the end of another string.
7) Write a java program to print the following pattern:
6 5 4 3 2 1
6 5 4 3 2
6 5 4 3
6 5 4
6 5
6
8) Write a java program to print the following pattern:
*
* *
* * *
* * * *
* * * * * * * * *
* * *
* *
*
9) Write a java program to display Fibonacci series up to a given term.
10) Write a java program to print the following pattern:
(a)
a. + b)
(a + b + c)
(a + b + c + d)
(a + b + c + d + e)
(a + b + c + d + e + f)
11) Write a java program to print sum of series (i.e. 0, 1, 4, 9, 16…).
12) Write a java program to print sum of series (i.e. 1 + 1/1! + 2/2! + 3/3! + 4/4!
+…..)
13) Write a Java program to find the maximum and minimum value of an array.
14) Write a Java program to calculate the average value of array elements.
15) Write a Java program to add two matrices of the same size.




Reviews
There are no reviews yet.