JAVA Important Questions (UNIT WISE)
JAVA Important Questions (UNIT WISE)
JAVA Important Questions (UNIT WISE)
IMPORTANT QUESTIONS
Unit I
1.Write a program that will compute the following series:
(a) 1/1 + 1/2 + 1/3 + ...... + 1/n
(b) 1/1 + 1/2 + 1/22+ ....... + 1/2n.
[April 07 Set 1][April 07 Set 3][Sep 07 Set 3]
2.(a) What are conventional styles for class names, method names,
constants and variables?
(b) Can a java run on any machine? What is needed to run java on a
computer?
(c) Explain the concept of keywords. List some java keywords.
[April 07 Set 2]
3.(a) Describe the genesis of java. Also write brief overview of java
(b) List and explain the control statements used in java. Also describe
the syntax of the control statements with suitable illustration.
[April 07 Set 4]
5.(a) When dealing with very small or very large numbers, what steps
would you take to improve the accuracy of the calculations
(b) What are symbolic constants? How are they useful in developing
programs?
(c) Write a program to determine the sum of the following harmonic
series for a given value 1 + 1/2 + 1/3 + ..... + 1/n The value of n should
be given interactively through the keyboard. [Sep 07 Set 2]
Object Oriented Programming
IMPORTANT QUESTIONS
Unit II
1.(a) What is an array? Why arrays are easier to use compared to a
bunch of related variables?
(b) Write a program for transposition of a matrix using arraycopy
command.
[April 07 Set 1][April 07 Set 3]
4.(a) How does String class differ from the StringBuffer class?
(b) Write program to do the following:
i. To output the question who is the inventor of java?
ii. To accept an answer
iii. To print out Good and then stop, if the answer is correct.
iv. To output the message try again, if the answer is wrong
v. To display the correct answer when the answer is wrong even at the
third attempt.
[Sept 07 Set 1]
5.Briefly explain following:
(a) final & this keywords
(b) garbage collection
(c) passing parameter-call by value
(d) Overloading methods & Constructors.
[Sept 07 Set 2]
formula:
ex = 1 + x/1! + x2/2! + x3/3! + ..........
[Sept 07 Set 4]
Unit III
Unit IV
Unit V
oriented program-ming.
(b) Give overview of Javas event handling mechanism.
[Sept 07 Set 1]
8.(a) What is Delegation Event model? Explain it. What are its
benefits?
(b) Define Event. Give examples of events. Define event handler. How
it handles events.
[Sept 07 Set 4]
Object Oriented Programming
IMPORTANT QUESTIONS
Unit VII
Unit VIII
3.(a) What is a port? What is the difference between port and socket?
(b) Explain several methods provided by URL?
[April 07 Set 3]