Formatting page ...
father leblond school COMPUTER APPLICATIONS (Theory) (Two hours) Answer to this paper must be written on the paper provided separately. You will not be allowed to write during the first 15 minutes. This time is to be spent in reading the question paper. The time given at the head of this paper is the time allowed to write the answers. This Paper is divided into 2 sections. Attempt all questions from Section A and any four questions from Section B. The intended marks for questions or parts of questions are given in the brackets [ ] SECTION A (40 Marks) Attempt all questions Question 1 (a) Name any two tokens of Java. (b) What is JVM? (c) What are Unary and Binary operators? Give an example for each. (d) Calculate the output of the following expression. Also arrange the operators of the given expression in the decreasing order of precedence. 2 10 * 3 + 100 / 11 (e) Name any two principles of OOP. (f) Illustrate your answer using example of String and character literal. (g) Name the keyword and write one example that invoke package by default. [1] [1] [2] [2] [1] [2] [1] Question 2 (a) What is the difference between local and instance variable? Write one example each. (b) State the use of new operator with an example. (c) Create a class with a variable of int,String,char data type. Create a parameterized constructor to initialize the class variable. (d) Write the output of the following: void display( ) { int p[ ] = { 1, 11, 111, 1111, 11111}; for( int i = (p.length -1); i>=0; i- -) System.out.println(p[i]); (e) (f) } Write the equivalent Java expression for (2.a.S + u2)1/2 State the difference between != and ! . X/SELECTION THIS PAPER CONSISTS OF 4 PRINTED PAGES [2] [2] [2] [2] [1] [1] TURN OVER
|