IMP Que of JAVA
IMP Que of JAVA
1. Do as directed.
i. What is JVM?
ii. _______ is the cosmic super class.
iii. What is the use of command line argument?
iv. What is the use of this keyword?
v. The main( ) method can be declared as final. (True/False)
vi. What do you mean by Interface?
vii. What do you mean by garbage collection
2. Answer following questions.
A. Justify Java is platform independent.
B. List primitive datatypes of java with its size and range.
C. Write syntax for creating and initializing an array.
D. List four Exception names in java.
E. Write code snippet showing simple inheritance.
F. Describe four methods of wrapper classes.
G. Describe generic class with example.
3. (a) Define Following terms (any seven)
(1) Static block
(2) Encapsulation
(3) Synchronized keyword
(4) Finalize method
(5) Calendar class
(6) Autoboxing
(7) Final keyword
(8) Super keyword
(b) Differentiate between following(any two)
1) While loop and for loop
2) String class and String Buffer class
3) Abstract class and Abstract method
4. Do As Directed :
1) null is a keyword in java. (T/F) (With reason)
2) It is not mandatory that a class must be abstract when a method is declared
as abstract in java.(T/F] (With reason)
3) String is primitive data type. (T/ F)
4) If exception occurs in try block then finally block will be executed.(T/F)
(With reason)
5) _____ has static constants and abstract methods.
6) What is the use of this keyword?
7) What is a command line argument?
5. Do as directed.
i. What is Java Virtual Machine?
Long Questions
UNIT-1
1. Explain all concepts of Object-Oriented Programming.
2. Explain why Java is popular with all its features.
OR
List and explain Java Buzzwords in detail. (3 times)
OR
List out all the java buzzwords and explain any six. (3 times)
OR
Explain Java buzzwords in detail.
OR
List down the characteristics of JAVA and explain any 4 of them in detail.
3. Explain Datatypes and why it is important.
4. Explain all Operator with appropriate example.
OR
Explain different operators available in Java Programming.
5. Explain the arithmetic and relational operators using suitable examples.
OR
Which different operators are used in java? Explain Arithmetic and Relational
operators in java. (3 times)
6. Explain do while, while and for loop statements.
UNIT-2
1. Explain importance of Constructor. Discuss the overloading of methods and
constructors with suitable example.
2. Demonstrate use of Top-level nested classes and Inner classes with suitable example.
3. Differentiate between constructor and method of class. Define method overloading
and its purpose. Write a program to demonstrate the constructor overloading.
4. How can we access the private data members in another class? Explain with demo
example.
5. What is constructor? Explain constructor overloading and method overloading with
example.
UNIT-3
1. Differentiate: Abstract class vs Interface.
2. Explain the process of creating and using package in java with proper example.
3. What is the usage of exceptions in Java? Discuss the try, catch and finally using
proper example.
4. Explain this, super, static, final, finally, static and garbage collection.
5. Explain hierarchical inheritance with example.
6. What is package? How to create and import packages in java? Explain it with suitable
example.
7. Define interface. How does it overcome the problem of java’s multiple inheritance?
8. Differentiate: Abstract class vs Interface.
9. What is an interface? How it is important in java? Explain with example.
10. What is Package? Explain the uses of the keywords "package" and "import".
11. What is exception handling? Discuss the uses of "try", "catch" and "finally” with
example.
12. What is inheritance? Explain multilevel inheritance with appropriate example.
13. How Overridden Methods Support Polymorphism? Explain it with appropriate
example.
14. What is a package? Explain package with simple example.
15. What is interface? Explain multiple inheritance with appropriate example.
16. What is exception handling? Explain it with try and catch blocks.
17. Explain inheritance with example.
18. What is package? How to create and import packages in java? Explain it with suitable
example.
19. Write a detailed note on Exception in java.
20. What are the access specifiers available in Java? Explain each of them and state which
of these can be applied to members of a class and which can be applied to members of
a package.
21. Discuss static modifier and its use with different class component with example.
22. Define package and accessibility of class across different access modifiers.
23. Describe steps to create package and access package with example.
24. Create and handle custom Exception in java.
25. Explain java support multiple inheritance with example. 07
26. Differentiate following
1. Checked Exception and Unchecked Exception
2. throw and throws keywords
UNIT-4
1. Where is Collection framework used? Discuss the Set and List interfaces with
example.
2. What is collection framework? Explain set and sorted set interface with example.
3. What is class? Explain any one wrapper class with example.
4. What is Autoboxing and Unboxing? Explain it with appropriate example.
5. Explain collection framework with collection interface, list interface and set interface.
6. What is Collection framework? Discuss the Set and List interfaces with example.
7. Explain ArrayList and its methods and iterator with example.
8. Explain methods of String class and StringBuffer class.
UNIT-5
1. Explain: i. Explain life cycle states of Thread.
ii. What is a daemon thread? Give one example of a daemon thread.
2. Explain InputStream, Reader, OutputStream and Writer classes.
3. Write a program that copies all the content from one file to another. Pass the file
names using command line argument.
4. What is Generic class? Explain it with bounded type parameter.
5. Why we need synchronization in thread? Explain with example.
6. What is thread? Explain thread life cycle in detail with diagram.
7. Explain Generics in java with demo program.
8. Explain InputStream class, OutputStream class, Reader class and Writer class with
suitable java code.
9. Explain scanner class with example.
10. What is thread? How thread is created in java? Explain with example.
11. What is generic class? Explain generic method with example.
12. Explain thread life cycle.
13. What is file? Discuss any six methods of file class.
14. What is thread? Explain several states of thread.
15. Explain Generic class with two type parameters.