Dec 2014
Bachelor of Computer Applications (BCA) Examination
V Semester
Introduction to Java
Time 3 Hours] [Max. Marks 50
Note : All questions are compulsory. All questions carry equal marks.
1. Explain different types of operators available in Java with their precedence.
(a) Explain type casting with example.
(b) Explain various primitive data types available in Java.
2. (a) Write a Java program to find sum of series 1/1! + 2/2! + n/n!. (b) Explain string and methods to manipulate strings in Java.
(a) What is Array in Java ? Declare an array named "a" of ten elements of type int and initialize the
value 10, 20 .. 100 respectively.
(b) Write the use of "break" and "continue" with example.
3. (a) What is Constructor ? Explain different types of construction in Java.
(b) Explain different access modifiers available in Java.
(a) Define (i) class (ii) object (iii) method (iv) field in Java.
(b) Write a Java program to create a class student having rollno, name attributes and enroll as a
method. Also write constructor function for student class.
4. (a) Explain Inheritance with its types supported in Java.
(b) Write short note on Exception Handling.
(a) Explain Multithreading in Java with an. example.
(b) What is method overloading ? Give example.
5. (a) Explain the concept of Java Virtual Machine. Explain process / steps performed by Java Virtual Machine;
(b) What is Package ? How can you create a package in Java ?
(a) Write short note on file handling using Java.
(b) Explain checked and unchecked exception in Java: Write a Java program that handles an Arithmetic Exception.