V.L.B.JANAKIAMMALCOLLEGE OF ENGINEERING & TECHNOLOGY
KOVAIPUDUR, COIMBATORE-42.
ACADEMIC YEAR 2010-2011(Odd Semester)
Name of the staff: K.BHUVANESWARI
Class : III CSE-V SEM
Subject : JAVA PROGRAMMING
TUTORIAL QUESTIONS
UNIT I
- List out concepts of object oriented programming.
- Give the benefits of oop.
- What is java?
- With a simple program write the steps to compile and execute java program.
- Differentiate java and C++.
- Why java is called as fully oop?
- Define keyword. Write 5 java reserved keywords.
- What is an identifier?
- Write the data types in java?
- List the conditions how an automatic type conversion will take place?
- List the type promotion rules.
- Define array. Give examples for types of arrays.
- List out and write example for arithmetic operators in java.
- List out and write example for arithmetic operators in java.
- List out and write example for bitwise operators in java.
- List out and write example for relational operators in java.
- With a table specify the precedence of java operators.
- List out the control statements in java.
- Define and give the general form of class.
- Define object.
- What is method? Give its general form.
- What is constructor? Give example
- What is parameterized constructor?
- What is this keyword?
- What is garbage collection in java?How it differs form c++
- What is finalize () method?Give its general form.
- What is method overloading?Give example
- How to overload a constructor?Give example.
- What is static keyword?List out the restrictions that a method to be declared as static.
- What is final keyword in java? Give its equivalent c++ keyword.
- What is nested class? Give its types.
- What is inner class?
- What is a command line argument? Give example.
UNIT II
- What is inheritance?
- Write the use of super keyword? Give its syntax.
- What is method overriding?
- Define Dynamic method dispatch.
- Define abstract class. Give example
- How final keyword is used to prevent overriding and inheritance?
- Define package. Give syntax to declare a package.
- Usage of import statement in java?
- Define interface. Give its general form.
- List out the types of inheritance.
- How to implement multiple inheritance in java?
- What the use is of extends and implements keyword?
- Write the example for extending interfaces?
- List out the string operations in java.
- How string buffer class differs from string class.
- List out the operations that are performed using string buffer class.
UNIT III
- What is exception?Give its types.
- What is exception handling? Give its general form.
- How a divide by zero exception monitored using try and catch blocks.
- What is the need of multiple catch statements? give example
- Define throw
- Define throws. Give its general form.
- What is need of finally method in exception handling?
- What is checked and unchecked exceptions?
- Write a sample program for chained exception.
- Write few built in exceptions in java.
- Write a sample program for arithmetic exception
- Define thread
- List out the states of thread.
- Define context switch. Write the rules to determine context switch.
- Write down the purpose of monitor mechanism.
- Write the two ways to create a thread
- What is the use of isAlive () and join () method in thread?
- What is thread priority? Give the use of setPriority and getPriority methods.
- What is synchronization?
- What is synchronized statement? Give its general form.
- How interthread communication takes place in thread?
- Define deadlock.
- Define stream. Give its types
- What are the abstract classes in byte stream class?
- What are the abstract classes in character stream class?
- What is the advantage of using system class?
- How you read a console input? Give examples.
- What is the use of print stream class?
- What is file? List out the constructors used for creating a file.
- How to find whether the given object is file or directory?
- Give a sample program for list () method.
- List out the stream classes used for file I/O.
- What is serialization?
- What is the use of serializable and externalizable interfaces?
UNIT IV
- What is collection?
- List out the classes in java.util package.
- Write the goals of collection framework?
- Define List, Set, and Sorted set.
- What is the use of iterator and listiterator interface?
- What is map?
- List out the classes used in map.
- What is comparator interface? Give a sample code for it.
- What is legacy class?
- List out the legacy classes in java.util package.
- What is vector? Give its constructors
- What is dictionary class?
- What is HashTable?
- What is Properties?
- Write a simple applet program to display a given text.
- What is applet? Write its interfaces.
- What are the states of applet?
- What is the difference between applet and application programming?
- List out the methods used for initialization and termination of applets.
- Write down the ways to execute an applet.
- Write down the syntax for standard applet tag.
- Write the methods in AudioClip interface.
- What is the use of AppletStub interface?
- What is Event and event Sources?
- What is event delegation model?
- What is listener?
- Give some examples for event sources.
- What is adapter class?
- What is inner class? Give example
- Write the use of EventObject class?
- Write a simple applet program to listen the key pressed and released by the user.
UNIT V
- What is BitSet class? Give its constructors?
- Write a simple program to perform and xor operations on bits?
- What is string tokenzier? Give its constructors.
- Write a program to convert the given word “ Java Programming “ into tokens.
- Write a program to display the Date and Time using calendar class?
- Write a program to find the given year is leap year or not?
- What is Gregorian calendar?
- What is the use of Time Zone class?
- What is the use of locale class?
- What is Random class? Give its constructors?
- Using Random class Display a bell like distribution of numbers.
- Write a program to display the currency symbol of US and India?