etm java papers
SET 1 nov-2003
-
- write about any 6 distinct features in Java Programming
- Write about the standard data types in Java
-
- What is meant by overloading methods? What are advantages of overloading
concept?
- Write a method to find Area that can find the area of the circle/
square/rectangle using overloading concept.
-
- Consider two calls
public class D extends B
{ public void f()
{this.g(); //1
}
public void g()
{ super.g(); //2
}
............
} Which one of them is an example of early binding? Which one of
them is an example of late binding? Explain.
- Explain the term shallow copy and deep copy
- Implement a super class Person. Make Y two classes, Student and
Instructor , Inherit from Person. A person has a name and a year of Birth. A
student has a major and an instructor has a salary.Write the Class
definitions , the constructors.
- Develop an applet that receives three numerical values as a input from the
user and then displays the largest of the three on the screen .Write a HTML
page and test the applet.
-
- How is a container different from other types of components?
- What is window? What are the operations of Window?
-
- Explain applet basics? State how it runs in a window.
- Write a short notes on the following :
- RuntimeException
- Uncaught Exception
- Statements used to handle exceptions in Java
- Write a Java program to read a list of elements from a data file and store
the list in :
- the same file
- another file
set 2 -nov 2003
-
- Discuss the different types of literals available in Java.
- Write about automatic type conversion and explain when casting is
needed?
-
- Can constructors in Java be overloaded? If so illustrate with an example
.
- Discuss the JDK and its components in brief.
-
- What is default package in Java programs?
- Suppose the class Sub extends the class Sandwich. Which of the following
assignments are legal?
Sandwich x = new Sandwich();
Sub y = new Sub();
x = y ;
y = x;
y = new Sandwich();
x = new Sub();
- How does a cast class references such as (Savings Account)b differ from
a cast of number values such as (int) x ?
- Explain the two meanings of the super keyword ? Explain the two meanings
of this keyword. How are they related?
-
- Explain the event driven programming?
- write briefly applet display methods.
- Write a program to draw several shapes in the created window using applets
- Explain the various methods defined in the applet class in detail.
- Write a short notes on the following
- Types of Exceptions
- Cautions in using exception clause
- Multi threading
- Thread groups
-
- Explain the functions of PrintStream and DataInputStream
- Summarize the list and explain the important methods available under the
File class
SET 3 -Nov-2003
-
- Write down the syntax and working procedure of loop structures while
& do... while in Java.
- discuss the following i) Code reusability ii) Data Abstraction
-
- Distinguish between overloading and overriding
- when do we declare a method as final.
- Explain the difference between
new BankAccount[2000];
And
BankAccount b;
- Implement a class Student. A Student has a name and a total quiz score.
Supply an appropriate constructor and methods getName(), addQuiz(int score),
getTotalScore() and getAverageScore(). To Compute the latter, you also need
to store the number of quizzes that the student took.
-
- Write a Java program, which will read a string and rewrite in the
Alphabetical order, For example, the word STRING should be Written as GINRST
- what is a vector? How does it differ from an array?
- Write a Java program that accepts a shopping list of five items from the
command line and stores them in a vector.
- What is task perform by the layout manager and Explain briefly different
types of layout managers.
- What is the purpose of mouse event class? Explain its method in detail.
- Discuss the applet initialization and termination, and the methods
involved in it in detail.
-
- Explain how exceptions are handled in Java. Demonstrate how exceptions
are thrown.
- Describe with the help of a diagram the exception class hierarchy.
-
- Summarize the list of byte stream classes.
- Summarize the list of the character stream I/O classes.
SET 4 nov-2003
-
- Write the different kinds of arithmetic and relational operators in
Java.
- Discuss the package java.lang in detail.
-
- Give a Java code to construct the following objects.
- a square with center (100,100) and side length 25
- A bank account with a balance of Rs.5000
- A console reader that reads from System.in
- If b1 and b2 store objects of class BankAccount , Consider the
following instructions
b1.deposit(b2.getbalance()); b2.deposit(b1.getbalance()); Are
the balances of b1 and b2 now identical? Explain.
- Implement a class Circle that has methods getArea() and
getCircumference(). In the constructor, supply the radius of the circle.
-
- What are the advantages of inheritance ?
- Explain how the objects are passed as arguments to methods with an
example.
- Write a Java program which will read a text and count all occurrences of
a given word.
- Write an applet to display the following figure
- Write an example show the handling of mouse events in JAVA?
- "Applets override update() method of AWT" . Justify the statement with an
example in detail.
-
- Demonstrate the use of thread synchronization primitives.
- Demonstrate the use of multiple threads in Java.
- Explain the following:
a) InputStream b) OutputStream c) Reader
d)Writer SET 1 nov-2004
-
- What is a Java Applet? What is advantage of writing applets in Java? How
it differs from different from application programs?
- What is the usage of import statement? Explain with suitable example.
-
- What is meant by overloading methods? What are the advantages of
overloading concept?
- Write a method to find Area that can find the area of circle/square
/rectangle using overloading concept.
-
- Write a Java Program to insert an element in the given array in the
given position
- List out the features of String class
- Develop an Applet that receives three numerical values as a input from the
user and then displays the displays the largest of the three on the screen.
Write a HTML page and test the applet.
-
- How is a container different from other types of components ?
- What is window? What are the operations of window?
- Discuss the applet initialization and termination , and the methods
involved it in detail
- why exception handling is considered one of the important features in OOP
. Write your explanation with suitable examples.
- Write short notes on the following:
- Interactive input and output screens
- Processing external files
- Random access files
- Exception handling
SET 2 nov-2004
-
- Explain the usage of switch statement in Java by writing suitable
example program in Java.
- In which ascpect, public data members differ from private and protected
data members in Java program? Explain the concept with a suitable example.
-
- Can constructors in Java be overloaded? If so illustrate with an
example.
- Discuss the JDK and its components in brief
-
- Write a Java program to delete an element from a given array.
- Write a Java program to find the determinant of a given matrix
-
- Explain the event driven programming
- Write briefly applet display methods.
- Write a program to draw several shapes in the created window using
applets.
- "Applets override update() method of AWT." Justify the statement with an
example in detail.
- What are the clauses used in Java to handle exceptions? Explain the syntax
of each clause with necessary examples
-
- List out any four Java's Checked Exceptions defined in java.lang ?
Explain it's use with an example?
- What are the differences between
- a stream and a reader
- sequential access and random access
SET 3
nov-2004
-
- Write down the syntax & working of loop structures, while &
do-while in Java.
- Discuss the following : i) Code reusability ii) Data Abstraction
-
- Distinguish between over loading and overriding
- when do we declare a method as final
- Explain the difference between
new BankAccount[2000];
And
BankAccount b;
- Implement a class Student. A Student has name and a total quiz score .
Supply an appropriate constructor and methods getName() , addQuiz(int score)
, getTotalScore() and getAverageScore() . To Compute the later you also need
to store the number of quizess that the student took.
-
- Explain method overloading with an example.
- What are the advantages of final class.
- Write a program to describe how multi dimensional arrays can be used
- What is task perform by the layout manager and explain briefly different
types of layout managers.
- What is the purpose of mouse event class? Explain its methods in detail
- Explain the life cycle of an applet and the methods involved
-
- Explain how exception handling mechanism can be used for debugging a
program.
- Is it essential to catch all types of exceptions? Justify your answer.
- Justify your answer in the following cases.What happens
- if you try to write to a random acess file that is opened only for
reading ?
- if you try to save an object that is not serializable in an object
stream?
- if you try to open a file for writing , but the file or device is write
protected (some times called read only )?
- if you try to open a file for reading that doesn't exist?
SET 4 nov-2004
-
- How a for loop can be defined and used within a program ?Explain with
suitable examples
- Explain the role of Java applets in designing a web page .
-
-
-
-
- Write a program which creates a window with yellow back ground color and
message HOW ARE YOU?
- With an example show the handling of mouse events in JAVA?
- Differentiate event sources and event listeners in an applet with an
example
- Define the basic purpose of exception handling. Demonstrate the coding of
exception handler
-
-
-
-
SET 1 nov-2002
-
- what are the features of Java that made the language so important ?
- What is a class ? How do classes help us to organize our programs ?
- What are objects? How are they created from a class? When do we declare
a member of a class static?
-
- Design a class to represent a bank acount . Include the following
members.
Data members: Name of the depositor
Account Number
Type of account
Balance amount in the account
Methods: To assign initial values
To deposit an amount
To with draw an amount after checking balance
To display the name and balance
- Explain the various control structures available in Java with suitable
pieces of code examples.
-
- What are the major differences and similiraties between interfaces and
classes.
- Describe various forms of implementing interfaces. Give examples for
each case.
- Give an example where interface can be used to support multiple
inheritance.
-
- Define a package? What is the necessity of packages?
- How do we add class or interface to a package?
- Discuss various levels of access protection available for packages and
their implications.
-
- What is a component object in the Java AWT?
- How is a container different from other types of components ?
- What are the five different layout manager types? Which managers use the
one argument add method, and which use the method in which the first
argument is a string value and the second a component?
-
- Describe the different stages inthe life cycle of an applet. Distinguish
between init() and start() methods.
- Develop an applet that receives the numeric values from the user and
display the largest of the three on the screen.
- Write briefly about applet display methods.
-
- How do we set priorities for threads? What are the two methods by which
we may stop threads ?
- Develop a simple life application program to illustrate the use of multi
threads.
- What is synchronization ? Explain how synchronized methods ar used in
Java programming
-
- How are user defined exceptions are handled in Java? Explain in detail
with programming examples.
- Create a try block that is likely to generate three types of exceptions
and then incorporate necessary catch blocks to catch and handle them
appropriately.
SET 2 nov-2002
-
- Explain the characteristics of Java.
- Why is Java known as platform independent language? How is this
achieved?
- What are the components of Java architecture? Explain in detail.
-
- List eight basic data types used in Java? Give examples.
- What is type casting? Why is it required in programming ?
- What are different types of IF statements in Java? Illustrate with
examples.
-
- Distinguish between the following terms. i)Objects and classes ii) Data
abstraction and data encapsulation iii) Inheritance and polymorphism iv)
Dynamic binding and message passing
- Discuss the different levels of access protection availabel in Java.
- What is the difference between overriding and over loading a method?
-
- Describe various forms of implementing interfaces. Give examples of Java
code for each case.
- What is a package ? How do we design a package ? How do we add a class
or interface to a package ?
-
- What is the difference between a frame , a window and a containers?
- What is the task performed by the layout manager?
- Explain how the mechanism of inheritance , composition and
implementation of an interface are all involved in the task of attatching a
layout manager to a container.
-
- What is an applet? What are the differences between an applet and an
application.
- Write an applet to display the current date and time.
- What is default layout of an applet?
-
- What is an exception ? Explain the different types of exceptions
- Write a program to demonstrate the use of exception handling
- List some of the most common types of exceptions in Java. Give examples.
-
- What is a thread What is multithreading ? Explain
- Explain the life cycle of a thread.
- How to create thread? Explain in detail.
SET 3 nov-2002
-
- Write a Java program to calculate the factorial of a given integer at
command line.
- Write the syntax and use of the following Java operators.
i) Switch
ii)Break iii)if-else-if iv)return
-
- What is type casting ? Why is it required in programming ? Give
Examples.
- What is a consructor ? What are its special properties ? How do we
invoke a constructor? Give examples
- Why do we declare a method abstract or final.
-
- What are the applications of wrapper class?
- Write a Java program that accepts a shopping list of five items from the
command line and store them in a vector.
- Waht is an exception? How do you handle exception. Explain in detail with
examples.
-
- Explain the steps involved in
- Developing and running a level applet
- Loading and running a remote applet.
- Develop an applet that receives three numeric values as input from the
user and then display the largest of the three on the screen. Write a HTML
page.
-
- How is Java's coordinate system organized?
- Describe the three ways of drawing polygons
-
- Create a DataInputStream for the file names ? "student.dat"
- Write a program to create a file stream that concatenates two existing
files.
- Write a short note on the following
- Event driven programming
- Multi threading
- Interactive input and output
SET 4 nov-2002
-
- Write a program (Java) to display whether a integer entered at command
line is prime or not.
- Write twelve bitwise operators in Java and explain their usage.
- Distinguish between the following terms
- Objects and classes
- Data abstraction and data encapsulation
- Inheritance and polymorphism
-
- Discuss the different levels of access protection available in Java.
- How does a string class differ from the string buffer class?
- What is a vector? How is it different from an array?
-
- What is a finally block? When and how is it used? Give a suitable
example.
- Define an exception called "NomatchException " that is thrown when a
string is not equal to "India" write a program that uses exception .
-
- How do applets differ from application programs?
- Why do applet classes need to be declared as public?
- Describe different stages in the life cycle of an applet.
- Distinguish between init() and start() methods
- Write applets to draw the following shapes
- Cylinder
- Cube
- Circle inside a square
-
- Describe the functions of the File class
- State the steps involved in creating a disk file .
- Which streams must always be used to process external files? Why?
- Write short note on the following
- Casting objects
- Frames
- Multi-threading
|