We all love Java for School Students because of its Uniqueness Using Scanner class, write a program to input a string and display all those words of the string which begins with a capital letter and end with a small letter. + ⋯ up to n terms (Where x and n are to be inputted from the user) To find the sum of the series given below: To input a word from the user and print it in the following pattern: J JA JAV JAVA Write a menu driven program to perform the following: (Use switch-case statement) (a) What is a constructor and what is its use? Give the output in the following function definitions and also write what mathematical operation it carries out if value of n = 7: void test1(int n) Sample Output: The final Array after joining is : The final Array after sorting is :ĥ 6 45 17 2 58 33 13 25 1 0 7 9 0 1 2 5 6 7 9 13 17 25 33 45 58 Write Java statements to check if the 5th element of an array X is divisible by 2. What is the purpose of: (i) new operator (ii) this keyword ![]() + 25 / − Write a Java expression for 6 Write Java statements to find if a character variable called ‘var’ contains an alphabet or not. Give an example each for: (i) Runtime Error (ii) Syntax Error (iii) Logical Error Differentiate between equals ( ) and compareTo ( ) functions. Find the value of c where x = 0, y = 10.25, z = -5 c =(x + y * z / 2.5)Įxplain with the help of an example, the purpose of default in a switch-case construct. ![]() What is a compound statement? Give an example. State one similarity and one difference between while and do-while loop. Give an example of a Relational operator and a Bitwise Operator. Name any two Object Oriented Programming (OOP) principles. ![]() SECTION A (40 Marks) Attempt all questions Question 1. The intended marks for questions or parts of questions are given in brackets. Attempt all questions from Section A and any four questions from Section B. The time given at the head of this Paper is the time allowed for writing the answers. This time is to be spent in reading the question paper. You will not be allowed to write during the first 15 minutes. COMPUTER APPLICATIONS (Theory) (Two hours) Answers to this Paper must be written on the paper provided separately.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |