0% found this document useful (0 votes)
180 views

Java 2013

This document contains questions from a Java programming exam. It has two parts - Part A contains 10 short answer questions about Java concepts like static, constructors, interfaces, streams, events, and swing components. Part B contains 5 programming questions requiring implementations of abstract classes, interfaces, event handling, exceptions, generics, and multithreading. Students are asked to answer all questions that cover fundamental and advanced Java topics like OOPs concepts, strings, collections, I/O, GUI programming, exceptions and multithreading.

Uploaded by

ShanthiniSampath
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
180 views

Java 2013

This document contains questions from a Java programming exam. It has two parts - Part A contains 10 short answer questions about Java concepts like static, constructors, interfaces, streams, events, and swing components. Part B contains 5 programming questions requiring implementations of abstract classes, interfaces, event handling, exceptions, generics, and multithreading. Students are asked to answer all questions that cover fundamental and advanced Java topics like OOPs concepts, strings, collections, I/O, GUI programming, exceptions and multithreading.

Uploaded by

ShanthiniSampath
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

B.E/B.Tech. DEGREE EXAMINATION, MAY/JUNE 2013.

Fifth Semester
Information Technology
IT 2301/IT 51/10144 IT 501- JAVA PROGRAMMING
(Regulation 2008/2010)
Time: Three hours
Maximum : 100
Marks
Answer ALL questions
PART A-(10 x 2 =20 marks)
1) What is static in java
2) What is the difference between a constructor and a method?
3) What is a string buffer class and how does it differs from string class?
4) Why is multiple inheritance using classes a disadvantage in java?
5)
How to define an interface?
6) What is a stream and which class allows you to read objects directly from a stream?
7) What is the relationship between an event- listener interface and an event adapter class?
8) Why are swing components called lightweight component?
9) What is java virtual machine?
10) Why do we need run() and start() method both? Can we achieve it with only run method?

m
o

c
.
s
te

a
d
p
u
u

PART B-(5x16=80 marks)


11) a) i) What does it mean that a method or class is abstract? Can we make an instance of an
abstract class? Explain it with example.
(8)
ii) What is polymorphism in java? Explain how polymorphism is supported in java.(8)
Or
b) i) What is constructor in java? Why constructor does not have return types in java? Explain in
with proper example. (8)
ii) Why do we need static members and how to access them? Explain it with clear
example (8)
12) a) Write a java program to maintain the books details like BookId, accession number; book
name, author, publication in books package and keep the journal details such as journal Id;
journal Id; journal name; in journal package in main class use these two packages details for staff
and student classes and display the books and journals information as requested by the user. (16)
Or
b) How to declare and initialize a string in java and also explain the different string handling
functions with suitable examples.(16)
13) a) Write a program to create interface method named customer. In this keep the methods
called information(), show() and also maintain the tax rate. Implement this interface in employee
class and calculate the tax of the employee based on their income.

.a

Or
b) i) How will you display an image on the frame in a window using java. (8)
ii) What is meant by stream? What are the types of streams and classes? Explain in detail.
(8)

m
o

14) a) What is event handling in java? List out the available event classes and listener interfaces
with suitable example. (16)
Or
b) What is exception handling in java? Why it is used? Write a java code to simulate the way a
stack mechanism works with exception handling, throwing and dealing with exceptions such as
stack is full(if you want to add more elements into the stack) or stack is empty(you want to pop
elements from the stack).

c
.
s
te

15) a) Explain in detail about generic classes and methods in java with suitable example.(16)
Or
b) Write a java program for inventory problem to illustrates the usage of thread synchronized
keyword and inter thread communication process. They have three classes called consumer,
producer and stock.

.a

a
d
p
u
u

You might also like