Professional Documents
Culture Documents
PRACTICE PAPER – 2
SUBJECT : COMPUTER APPLICATIONS
Question 1
Choose the correct answers to the questions from the given options.
(i) When object is converted to primitive data type, it is called as _______
(a) Auto boxing
(b) Type casting
(c) Unboxing
(d) Coercion
(a) COMP
(b) COM
(c) OMP
(d) OM
(a) private
(b) public
(c) protected
(d) default
(b) -22
(c) 100-78
(d) 178
(x) _____ package provides many methods which help to manipulate primitive data type.
(a) java.util
(b) java.lang
(c) java.awt
(d) java.io
Question 2
Define a class to store 10 numbers into the array. Search for an element input by the user using binary
search technique, display the element if it is found, otherwise display the message “NO SUCH
ELEMENT”
Question 3
Define a class to declare a character array of size 10, accept the character into the array and perform
the following:
•Count the number of lowercase letters in the array and print.
•Count the number of non – vowel characters in the array and print.
Question 4
Define a class to declare an array of size 50 of double data type, accept the elements into the array
and perform the following:
•Calculate and print the average of all the elements.
•Calculate and print the lowest value of the array.
Question 5
Define a class to accept two strings, convert them into lowercase. Check and print whether the first
character of first string is same as first character of second string or not. Also check and print whether
the last character of first string is same as last character of second string or not.
Question 6
Define a class to accept a string and a character. Calculate and print frequency of given character in
given string.
Question 7
Define a class to accept 10 strings into the array and print the strings which has more than four
characters.