JAVA PROGRAMMING_LAB QUESTIONS Modified
JAVA PROGRAMMING_LAB QUESTIONS Modified
Q11) A common problem in statistics is that of generating frequency distribution of the given data.
Assuming that the data consists of n positive integers in the range 1 to 25, write a program that prints
the number of times each integer occurs in the data.
Q13) Johnsy wants to create a matrix in which the elements are formed differently. The elements are
formed by adding the values of their index positions. Write a program that obtains the order of the
matrices and creates a matrix by adding the values of their index positions.
Q18) Problem statement: Write a Java program to count the number of days between two given
years.
Q7) Janu wants to write a java program to print the number of occurrences of a particular prime
number from the list of all prime factors of every number between the given limits.
Suppose the given limits are 2 and 8.
The numbers between this limit is
2345678
The list of all prime factors of the above numbers are
2
3
2,2
5
2,3
7
2,2,2
Now if the particular prime number is 3 then you should print the number of occurrences as 2
She knows only about the number of points needed to draw one side of the inner square.
Write a program to help her draw the sketch.