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

18CS0511-Object Oriented Programming

Uploaded by

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

18CS0511-Object Oriented Programming

Uploaded by

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

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR

Siddharth Nagar, Narayanavanam Road – 517583

QUESTION BANK (DESCRIPTIVE)

Subject with Code : OOP(18CS0511) Course & Branch: B.Tech – CSE


Year & Sem: II-B.Tech & II-Sem Regulation: R18

UNIT – I: The Java Language

Short Answer Questions [2Marks]


1. Explain two programming paradigms?
2. Explain how java provides security and portability?
3. List some java buzzwords?
4. Explain the importance of java Bytecode?
5. State the difference between object oriented model and structure oriented model?
6. What is identifier and Explain rules for creating a variable?
7. Explain primitive datatypes in java?
8. Explain leftshift and rightshift operators?
9. Is switch better than if-else-if (if yes justify)?
10. Explain enhanced for with example?
Long Answer Questions [10 Marks]
1. [ 5M ]
a) Explain History and Evolution of Java?
[ 5M ]
b) Explain Java Buzz Words?
2. [ 5M ]
a) What is Conditional Operator? Give any suitable example?
[ 5M ]
b) What are Java Selection Statements? Give an example to each one.
3. [ 10M ]
Explain about the Iteration Statements with an example.
4. [ 5M ]
a) What is an Array? Explain types of arrays in Java.
[ 5M ]
b) What is an Operator? Explain type of operators in Java with exampes.
5. [ 10M ]
What are Jump statements? Give an example for each of them.
6. [ 5M ]
a) What is a Data Type? How to declare variable in Java. Write the Rules?
[ 5M ]
b) What is Byte Code? What are the different states of Java Program execution?
7. [ 5M ]
a) Write a Java program to interchange the values without using third variable.
[ 5M ]
b) Write a Java program to use Bit-wise operators.
8. [ 5M ]
a) Explain Java security, Portability?
b) What is the Structure of Java? Explain type of programs in Java. [ 5M ]
9. Explain about the Control Statements in Java with example. [ 10M ]
10. Write a Java program to read and display the array elements. [ 10M ]
UNIT – II: Introducing Classes

Short Answer Questions [2Marks]


1. Define class and object?
2. Explain about constructors?
3. Write importance of garbage collection in java?
4. What is a method in java?
5. Explain about static keyword?
6. What is final in java?
7. Explain about commandline arguments in brief?
8. what is varags?
9. state the importance of super keyword?
10. Define package and interface with general forms?

Long Answer Questions [10 Marks]


1. a) What is mean by OOP? Explain OOP Concepts? [ 5M ]

b) Write about Garbage Collector in Java. [ 5M ]

2. a) What is a Class, Method and Object? Write the syntax to define these in java. [ 5M ]

b) What is a Constructor? Explain types of Constructors in Java? Write a java

program to find the Area of Circle using Constructor. [ 5M ]

3. a) Discuss about the static, final keywords with an example. [ 5M ]

b) What are command line arguments? Program to add two numbers using command

line arguments. [ 5M ]

4. a) What are the varargs in java? Write the syntax and develop any program. [ 5M ]

b) What is Inheritance? Explain types of inheritances. [ 5M ]

5. a) Discuss about the super keyword in java with example. [ 5M ]

b) Write the difference between Method Overriding and Method Overloading. [ 5M ]

6. Explain about the Dynamic Method Dispath in Java with example program. [ 10M ]

7. What is an abstract class? Explain all the cases to implement abstract class. [ 10M ]

8. a) Write a java program to display “Hello! Java” using Class, Object and Method. [ 5M ]

b) Write a java program to implement inheritance concept. [ 5M ]

9. a) What is a package? How to create user defined package in java with example. [ 5M ]

b) What is an interface? Rules to create an interface in java with example. [ 5M ]

10. Write a java program to find the factorial value of the given number using user

defined package concept. [ 10M ]


UNIT – III: Exception Handling
Short Answer Questions [2Marks]

1. What is an Exception? Explain types of Exception?


2. What do you mean by uncaught Exceptions?
3. Explain about try block and catch block?
4. What is nested try statements?
5. Differentiate throw and throws?
6. What is finally class?
7. What is a thread and explain thread priorities?
8. How we create multiple threads?
9. What is isAlive() and join()?
10. Define String and list some string handling functions?

Long Answer Questions [10 Marks]


1. a) What is an Exception? What are the Exception types? [ 5M ]

b) Explain try, catch, throw, throws and finally keywords? [ 5M ]

2. a) Explain about Nested try statements with an example. [ 5M ]

b) What are Java’s Built-in Exception? Write the importance of finally block. [ 5M ]

3. Write a java program to create own exception for NegetiveValueException if the

user enter negetive value. [ 10M ]

4. a) What is Multithreading? What are the ways to create multiple threads in java. [ 5M ]

b) Explain about Thread Life Cycle. [ 5M ]

5. a) How to set the priority to threads? what are the different ranges. [ 5M ]

b) Write a java program to create two threads and execute simultaneously. [ 5M ]

6. a) What is synchronization? How many types? Explain. [ 5M ]

b) Write a java program to implement interthread communication. [ 5M ]

7. a) What are Daemon Threads? Explain with an example. [ 5M ]

b) Write a java program to implement join() method in multithreading. [ 5M ]

8. a) What is a String? Explain different String declarations with an example. [ 5M ]

b) Write a java program to check the given string is palindrome or not. [ 5M ]

9. a) Write the difference between String and StringBuffer classes. [ 5M ]

b) Write a java program to sort the given names into ascending order. [ 5M ]

10. Write a Java program that creates three threads. First thread displays ― Good Morningǁ every
one second, the second thread displays ―Helloǁ every two seconds and the
UNIT – IV: Generics

Short Answer Questions [2Marks]


1. Define Generic ?
2. write the general form of generic class?
3. Define collections?
4. what is a collection class?
5. what is a collection interface?
6. Define Applet class?
7. List two Event Handling Mechanisms?
8. What is an Event class?
9. Explain about Sources of events?
10. Briefly describe about Event Listener Interface?
Long Answer Questions [10 Marks]

1. a) What is an Applet? Explain life cycle of an applet. [ 5M ]

b) Write a java applet program to display Smiley Face on the Applet. [ 5M ]

2. Explain about Delegation Event Model in Event Handling with example. [ 10M ]

3. a) Write a java program to implement Mouse Events. [ 5M ]

b) Discuss about Source, Event and Listeners in event handling. [ 5M ]

4. Write a java program to develop Login Window using AWT. [ 10M ]

5. a) List out any 10 AWT classes and their syntax. [ 5M ]

b) What are Layout Managers in java? Explain. [ 5M ]

6. a) Write a java program to implement Key events. [ 5M ]

b) Explain about the AWT Menu design. [ 5M ]

7. Write a java program to develop Notepad Application using AWT. [ 10M ]

8. a) Difference between AWT and Swings? [ 5M ]

b) Write a java swing program implement BorderLayout. [ 5M ]

9. Write a java swing program to find the sum of two numbers. [ 10M ]

10. Write a java swing program to find the factorial of the given number. [ 10M ]
UNIT – V: Introducing the AWT

Short Answer Questions [2Marks]

1. What is AWT controls?


2. Explain about Layout Managers?
3. Define Swing?
4. Explain Uses of addresss ports in networking?
5. What is a socket?
6. Explain about drivers and uses?
7. What is connections in java?
8. Explain about JDBC in brief?
9. What is a Statement?
10. Differentiate between Statement and prepared statemnts?
Long Answer Questions [10 Marks]

1. a) Explain java networking? Explain the architecture of networking in java. [ 5M ]

b) Discuss about socket programming in java. [ 5M ]

2. Write a java program to implement simple client and server program. [ 10M ]

3. a) What is JDBC? Explain architecture of JDBC. [ 5M ]

b) Difference between JDBC and ODBC. [ 5M ]

4. a) Explain the procedure to connect with the database in java. [ 5M ]

b) Discuss about java.sql package with an example. [ 5M ]

5. Write a java program to read and display data from database. [ 10M ]

6. What are the different JDBC drivers explain with syntax. [ 10M ]

7. a) Write a java JDBC program to display student details. [ 5M ]

b) Explain the steps to connect with the database using JDBC. [ 5M ]

8. Explain about PreparedStatement in JDBC. [ 10M ]

9. Write a java swaing application to perform Login Authentication using JDBC. [ 10M ]

10. a) What are the different JDBC Drivers used to connect with database. [ 5M ]

b) Explain about JDBC-ODBC architecture with a neat diagram. [ 5M ]

You might also like