Subject: Programming in JAVA
Group A (MCQ) Find them here.
GROUP-B
Give short answers of any five following questions. (5X5=25)
1. What is Loop? Explain FOR loop with example in java using array. [1 +4]
2. What are interfaces in java? Write a simple program in java to enter any four digit numbers and display with reverse using function. [1+4]
3. What is “this” keyword in java? Show with example this keyword using constructor . [1+4]
4. Define Inheritance. How can we achieve multiple inheritance in java show with example. [1+4]
5. Write a program in java to demonstrate the concept of break and continue statements. [1+4]
OR
Write any two features of polymorphism with better examples [1+4].
GROUP-C
Give long answer of any two following question. (8×2=16)
6. Write a program in java to multiply two 3*3 matrices using array [8].
OR
Write a program in java to find whether the elements of an array are even or odd number. [8].
7. WAP in JAVA to create a class that has data member roll, name and methods getdata() and showdata(). Also create an object of that class. The program should get the rollno and name of a student and display them. [4+1+3]
Find solutions here.