Department of Computer Science and Engineering
(Accredited by NBA)
Course Name:        Object Oriented Programming through Java      Class          II B.TECH
Faculty Name:       T.Satya Kumari                                Regulation     ACETR23
Academic Year:      2024-2025                                     Semester       III
                                               UNIT-I
1. a) Develop a Java program to demonstrate the behavior of static methods &variables?
   b) Explain the syntax of various Loop control statements in Java.
2. a) Explain how with the help of Command line arguments we can customize the behavior
      of the main() method.
   b) Is Java pure object-oriented program or not? Justify your answer.
3. a) Write a java program to read three numbers through the keyboard and find their sum and
      average.
   b) What is a variable? Explain their importance in java language. What rules to be
          followed to define them?
4. a) With the help of example program explain the various arithmetic operators supported by
        java language.
   b) List the various control statement. Explain any one control statement with the help of
      flowchart and example program.
5. a) What is Java? Describe the Basic rules to define java identifiers.
   b) Explain various types of Operators with example.
6 a) Explain various types of iterative statements with suitable example.
  b) Explain the type and behavior of Java variables.
7 a) What do you understand by type casting & automatic promotion? Explain with suitable
     examples.
  b) Explain the concepts JDK, JRE and JVM.
8. a) Illustrate the difference between java & C++. Why is Java language important in
      relevance to the Internet?
   b) Is java pure Object Oriented Language? Explain in detail. Mention the advantages &
disadvantages of java.
9. a) Explain main( ) method in java. What is java’s magic byte code? Explain in detail.
   b) What are java buzz words? Give brief description.
10. a) Answer the following:
        i. With the base of Unicode, Java platform has become better. Explain how?
       ii. Describe all the primitive data types supported by Java with appropriate
          examples and also specify their storage capacity/range.
    b) Develop a program to compute factorial of a given number.
11. a) List and explain the Tokens in the Java language.
   b) Demonstrate Bitwise operators using a Java program.
12. a) List and explain the control statements with examples.
     b) Demonstrate the operator precedence using a Java program.
13. a) List and explain the Data types in Java program with examples.
     b) Demonstrate the Increment and Decrement operators with a Java program.
14. a) Develop a Java program to perform string reverse operations.
     b) Compare the working of the while loop and do-while loop with suitable examples.
15. a) List and explain the features of Java language.
     b) Demonstrate Nested if and else using an example.
16. a) List and explain the formatted input and output statements.
     b) Demonstrate implicit and explicit type casting with an example program.
17. a) Explain the usage of Static variables and methods with an example Java program.
     b) List and explain the Unary, Binary and Ternary operators with examples.
18. a) Demonstrate logical operators with an example Java program.
     b) Develop a program to compute factorial of a number.
                                              UNIT-II
1. a) What are the special characteristics of constructors in Java. Write a Java program to
        initialize an object through constructor methods.
   b) Discuss different types of modifiers in Java and give an example for each modifier.
2. a) Differentiate between Method overloading and Method overriding with a Java
        Program.
  b) Explain the following keywords in Java with an example program:
       i) ‘this’ ii) ‘final’ keyword
3 a) In what way method overloading differs from overriding? Explain.
  b) Why we need the methods to solve the problems? Explain recursive methods.
4 a) Why we are using final classes and methods. Explain.
  b) Give brief description about the various access control mechanisms used in java.
5. a) Write a Java program to swap two numbers using call by reference.
   b) What are various Member access rules explain with an example?
6. a) Write a program to input any three numbers from the console & find out the maximum
number.
   b) Demonstrate Nested class concept with an example.
7. a) Discuss the various levels of Access protection available for packages and their
        implications.
  b) Explain about the console input and output with an example.
8. a) What are constructors? Explain different types of constructors with examples.
   b) What is method overloading? Explain with an example program.
9. a) Explain the uses of inner classes and local inner classes. With an example?
   b) Develop a Java Program to create an abstract class named Shape that contains two
      integers and an empty method named printArea(). Provide three classes named
      Rectangle, Triangle and Circle such that each one of the classes extends the class
      Shape. Each one of the classes contains only the method print Area () that prints the area
      of the given shape.
10. a) What is final keyword? Explain its importance in java with an example program.
     b) Discuss in detail the concept of default constructor and constructor with default
          arguments.
11. a) Compare the working of constructor overloading with method overloading.
     b) Demonstrate method overriding with an example java program.
12. a) Demonstrate the pass-by-value with the pass-by-reference method using an example
        programs.
    b) Demonstrate Nested class concept with an example.
13. a) Demonstrate pass-by-reference with an example program.
    b) Develop a program to carry out withdrawal operations in ATM.
14. a) Develop a method that initializes the attributes of an object.
    b) Discuss the advantage of This keyword with an example Java program.
15. a) Develop a program to compute the GCD of two numbers using Recursion.
    b) Discuss the advantage of final and static attributes.
16. a) Is it possible to access Private members of a class? Justify your answer.
    b) Demonstrate pass-by-value with an example Java program.
17. a) Demonstrate the Final method with an example.
    b) Discuss the advantage of a constructor.
18. a) Define recursion. Discuss the advantages of recursion.
    b) Is it possible to define a class within another class? Justify your answer.
                                             UNIT-III
1. a) Define Array. How to declare initialize and access multi-dimensional Arrays in Java.
   b) How many ways to find the duplicate elements in an array? Give an example?
2. a) Define an array. How can we initialize arrays? Explain with example program.
   b) Develop a program to apply bubble sort on an array elements.
3 a) How do you find all pairs of an integer array whose sum is equal to a given number?
  b) Explain the concept of arrays of varying lengths and arrays as vectors.
4. a) Discuss the advantage of the Method overriding.
   b) Develop a program to apply merge sort on array element.
5. a) Compare the features of Array with Vector.
   b) Develop a program to declare and access the three-dimensional arrays.
6. a) Write java program to demonstrate the single inheritance.
   b) Write a program to multiple two matrices.
7. a) What is interface in java? What is the use of interface in java?
   b) What is super keyword? Write a program to illustrate multilevel Inheritance?
8. a) What do you mean by abstract classes and interfaces? Explain the need of interface
      mechanism in programming.
   b) How do you find all pairs of an integer array whose sum is equal to a given number?
9. a) How many ways to find the duplicate elements in an array? Give an example?
   b) What is dynamic binding? Explain with an example?
10. a) How do you find all pairs of an integer array whose sum is equal to a given number?
    b) Explain the concept of arrays of varying lengths and arrays as vectors.
11. a) Is it possible to implement multiple inheritances in Java? Justify your answer.
    b) Develop a Java program to perform Binary search.
12. a) Demonstrate the Nested Interfaces using an example program.
    b) Develop a program to perform matrices multiplication.
                                             UNIT-IV
1 a) Give brief description about the role of wrapper classes in java.
  b) Write and explain the role of exception handling mechanism in java.
2 a) Elaborate on Java.lang package and its classes.
  b) Write a program to demonstrate the working of user defined exceptions.
3 a) What is exception handling? Explain the advantages of exception handling.
  b) Briefly explain check exceptions and unchecked exceptions.
4 a) What is the difference between Instant and Local Data Time?
  b) Write various possible combinations of try catch finally.
5 a) Explain about wrapper classes, Auto-boxing and Auto-unboxing.
  b) Elaborate on Time package, class instant and class object in detail.
6 a) Explain formatter class and random class in java until classes.
  b) Illustrate on how packages can be created, defined and accessed.
7 a) Briefly explain check exceptions and unchecked exceptions.
  b) What are the JVM exceptions and programmatic exceptions?
8 a)What do you mean by Auto-boxing and Auto-Unboxing? Explain with a suitable
     example.
  b) Explain the control flow in nested try catch finally.
9 a) Discuss the advantages of Wrapper classes.
  b) Demonstrate the class Throwable with the help of a Java program.
10 a) Is it possible to Rethrow exceptions? Justify your answer.
   b) List and explain any four packages in Java language.
11 a) Demonstrate Auto boxing and Auto unboxing with an example program.
   b) Demonstrate Checked exceptions with an example Java program.
12 a) List and explain the blocks of Exception handling with examples.
    b) Explain any two classes with method in Java.lang package.
13 a) Is it possible to define multiple catch blocks in Java? Justify your answer.
    b) Demonstrate Wrapper classes in Java language.
14 a) Demonstrate the formatting for Date / Time in Java with an example program.
    b) Discuss the importance of Throws keyword.
15 a) Demonstrate unchecked and checked exceptions with an example program.
    b) Is it possible to Rethrow exceptions? Justify your answer.
16 a) Illustrate the Hierarchy of standard Exception class with a neat sketch.
    b) Demonstrate Temporal Adjusters class with an example Java program.
17 a) Describe the Hierarchy of Java exception classes with a neat sketch.
    b) Explain types of exceptions and explain each keyword involved in exception
       handling.
18 a) Define package and its importance? What are the Different types of packages? How to
       create and import packages in Java?
    b) Define path and class path and access control? Give suitable examples.
19 a) Give brief description about the role of wrapper classes in java.
   b) Write and explain the role of exception handling mechanism in java.
20 a) Elaborate on Java.lang package and its classes.
    b) Write a program to demonstrate the working of user defined exceptions.
21 a) Discuss the advantages of Wrapper classes.
    b) Demonstrate the class Throwable with the help of a Java program.
22 a) Is it possible to Rethrow exceptions? Justify your answer.
   b) List and explain any four packages in Java language.
                                             UNIT-V
1 a) Write and explain the string buffer class.
    b) Write a java program to implement thread priorities.
2. a) Write a java program to find any given string is palindrome or not without using
        built-in functions.
    b) In how many ways a thread can be created in java. Explain any one method.
3. a) What are the states in the lifecycle of a thread? Explain with a neat diagram.
    b) What is the difference between String Buffer and String Builder class?
4. a) How to print total numbers of tables and views of a database using JDBC?
    b) What is the purpose of the Synchronized block?
5. a) What is multithreading? Mention the difference between process and thread.
   b) Why are string objects immutable? How to create an immutable class?
6. a) What is the string method in java? Explain.
   b) Discuss in detail JDBC Architecture with a neat diagram.
7. a) How to detect a deadlock condition? How can it be avoided?
  b) Differentiate between the Thread class and Runnable interface for creating a Thread.
8 a) How to connect Java application with Oracle and MYSQL database using JDBC?
  b) What is batch processing? What are the required methods in batch processing?
9. a) Discuss the issues of Race condition and Deadlock.
   b) Demonstrate Inter-thread communication with a Java program.
10 a) Develop a JDBC application to establish a link between MySQL and Java to save
     and access a table.
    b) List and explain any three methods of a String class.