Tutorial Topics
File Handling In Java - Examples WBUT : MCA 5th Semister - Java - 2010
WBUT : MCA 5th Semister - Java - 2009 - Java
2189    Arnab De    31/07/2017

WBUT or West Bengal university of technology is conducted MCA along with various technical courses. According to their MCA syllabus, students learn JAVA in the 5th semester. We are trying to give some guidance to the WBUT students by previous year solved papers. Here we discuss the Java paper of 2009.


Time Allotted: 3 HoursFull Marks: 70

The figures in the margin indicate full marks. Candidates are required to give their answers in their own words as far as practicable.

( Multiple Choice Type Questions )

1. Choose the correct alternatives for the following : 10 × 1 = 10

i) if (check(storeNum) ! = null) { } Referring to the above, what datatype could be returned by method check()?

a) boolean b) string

c) char d) byte.

ii) int j;
for(int i=0; i<14;i++)
j = 2 + i;
System.out.println ("j:" +j+ " i:"+i);
What is wrong with the above code ?

a) Integer "j" is not initialized b) nothing
c) you cannot declare integer i inside the for-loop declaration
d) you cannot print integer values without converting them to strings.

iii) Which access modifier is used to restrict the methods scope to itself and still allows other classes to subclass that class ?

a) private b) final c) protected d) final.

iv) What is the output of the following program ?

public class Trial
int x;
public static void main(String args[ ])
x = 8;
System.out.print("The value of x is" + x);

a) The program prints The value of x is 8
b) The program prints The value of x is 0
c) The program will not compile
d) None of these.

v) What do the ‘public’ and ‘private’ keywords relate to?

a) typing
b) garbage collection
c) polymorphism
d) access restriction.

vi) Which of the following is True?

a) A class that is abstract must be containing all abstract methods.
b) The final keyword indicates that the body of a method is to be found elsewhere. The code is written in non-Java language, typically in C/C++.
c) A static variable indicates there is only one copy of that variable.
d) A method defined as private indicates that it is accessible to all other classes in the same package.

vii) An interface can define only

a) abstract class b) final field
c) abstract method d) abstract method and final field.

viii) Under which circumstances will a thread stop?

a) The run() method that the thread is executing ends.
b) The call to the start( ) method of the thread object returns.
c) The suspend() method is called on the thread object.
d) The wait( ) method is called on the thread object.

ix) Dynamic method dispatcher is useful for

a) resolving method overriding b) resolving multilevel inheritance
c) resolving multiple inheritance anomaly d) none of these.

x) Which of the following statements is true regarding constructors?

a) All classes must define a constructor. 
b) A constructor can be declared private.
c) A constructor can return a value.
d) A constructor must initialize all the fields of a class.

( Short Answer Type Questions )

Answer any three of the following. 3 × 5 = 15

2. What is the difference between an Interface and an Abstract class? What is the purpose of garbage collection in Java and when is it used? 2 + 3


3. What is encapsulation? Explain how encapsulation provides modularity and information hiding?2 + 3


4. Discuss that steps involved in developing and running a local applet. 5


5. What are the main differences between Java and C the +? 5


6. What do you mean by the interface? Write the differences between an interface and an abstract class.5

( Long Answer Type Questions )

Answer any three of the following. 3 × 15 = 45

7. What is an object oriented paradigm ? Explain two differences between the object oriented paradigm of programming languages and the structured paradigm of programming languages. Suppose you write a Java program

Main.java as :

public class Main
public static void main ( String s [ ] )
System.out.println(“Best of luck”);

Is really this code platform ( Operating System ) independent? Justify your answer. If not, explain how the statement justifies “JAVA is called platform independent”. Explain all words in the statement: “public static void main (String [ ] s)” 2 + 3 + 3 + 3 + 4


8. What is multithreading ? Explain the advantages of multithread programs. Write a program in Java to explain how different priorities can be assigned to different threads. What is an exception ? Explain, with an example, how exceptions are handled in Java.  2 + 3 + 5 + 2 + 3



9. Describe the different stages in the lifecycle of an applet. Distinguish between init ( ) and start ( ) methods. What is the difference between checked and unchecked exceptions ? Give an example where the interface can be used to support multiple inheritances. Develop a Java program for the example. 4 + 3 + 3 + 5


10. a) Describe the complete life-cycle of a thread. What is synchronization? When is it used? 5 + 3 + 2


b) Write a small program which will synchronize among two threads. What is thread priority? 3 + 2



11. Write short notes on any three of the following : 3 × 5

a) Runtime polymorphism in Java

b) JVM

c) Inter-thread communication

d) Package

e) Final, finally and finalize keyword.

File Handling In Java - Examples WBUT : MCA 5th Semister - Java - 2010
Author Details
Arnab De
I have over 16 years of experience working as an IT professional, ranging from teaching at my own institute to being a computer faculty at different leading institute across Kolkata. I also work as a web developer and designer, having worked for renowned companies and brand. Through tutorialathome, I wish to share my years of knowledge with the readers.
Enter New Comment
Comment History
No Comment Found Yet.
Nelson Mandela
An educated, enlightened and informed population is one of the surest ways of promoting the health of a democracy.
Nelson Mandela
Today So Far
Total View (Lakh)
01/01/2018     33580
28/06/2017     29498
02/08/2017     26982
26/05/2018     26935
15/05/2017     23200
06/07/2017     21670
01/08/2017     21288
25/06/2018     20035
21/04/2018     18610
14/07/2017     16436