Department of IT
IT2301-JAVA PROGRAMMING
Question Bank
UNIT I
PART A
- What are the OOP Principles?
- What is Encapsulation?
- What is Polymorphism?
- What is Inheritance?
- What are the features of Java Language?
- What is the need for Java Language?
- What is platform independency?
- What is Architecture Neutral?
- How Java supports platform independency?
- Why Java is important to Internet?
- What are the types of programs Java can handle?
- What is an applet program?
- Compare Application and Applet.
- What are the advantages of Java Language?
- Give the contents of Java Environment (JDK).
- Give any 4 differences between C and Java.
- Give any 4 differences between C++ and Java.
- What are the different types of comment symbols in Java?
- What are the data types supported in Java?
- What is the difference between a char in C/C++ and char in Java?
- How is a constant defined in Java?
- What is the use of final keyword?
- What are the different types of operators used in Java?
- What is short-Circuit operator?
- What is labeled break?
- What is the use of for each control structure?
- What is the need for static variables?
- What is the need for static methods?
- Compare static constants and final constants.
- Why is main method assigned as public?
- Why is main method assigned as static?
- What are the types of variables Java handles?
- What are the relationships between classes?
- What is the general form of a class?
- What is the use of new keyword?
- If ObjA1 is an object of class A created using new keyword, What does the statement A ObjA2=ObjA1; mean?
- What is a constructor?
- What is the difference between a constructor and a method?
- What is the use of this keyword?
- What are destructors?
- How is object destruction done in Java?
- What is Garbage collection?
- What is the use of finalize method?
- Compare Garbage collection and finalize method?
- How is it guaranteed that finalize methods are called?
- What is method overloading?
- What is a String in Java?
- What is the difference between a String in Java and String in C/C++?
- Name a few String methods.
- What is the difference between Concat method and + operator to join strings?
- What is String Buffer?
- How does String class differ from the String Buffer class?
- Name some methods available under String Buffer class.
- Output of some expressions using String methods.
- How will you initialize arrays?
- What is arraycopy method? Explain with syntax.
- What are the methods under Util.Arrays?
- Use the array sort method to sort the given array.
- Give the syntax for array fill operation.
- What is vector? How is it different from an array?
- What is the constraint for using vectors?
- What is wrapper class?
- What are the different access specifiers available in Java?
- What is the default access specifier in Java?
- What is a package in Java?
- Name some Java API Packages.
- Name some JavaDoc Comments.
- What is CommandLine Arguments.
Part B
- Explain OOP Principles.
- Explain the features of Java Language.
- Compare and Contrast Java with C.
- Compare and Contrast Java with C++.
- Explain Constructors with examples.
- Explain the methods available under String and String Buffer Class.
- Explain the Date Class methods with examples.
- Discuss in detail the access specifiers available in Java.
- Explain the different visibility controls and also compare with each of them.
- Explain the different methods in java.Util.Arrays class with example.
- Explain Packages in detail.
- Discuss the methods under Array Class.
- Discuss some of the classes available under Lang package.
- Illustrate with examples: static and final.
- Explain method overriding with example program.
- What is javaDoc? Explain the comments for classes, methods, fields and link.
- Application Programs in Java.
UNIT II
PART A
- Define Inheritance
- What are the types of inheritance?
- How is multiple inheritance achieved in java?
- What is the use of super keyword?
- What are object wrappers? Give example.
- What is Inheritance Hierarchy?
- Differentiate overloading and overriding.
- Define polymorphism.
- Differentiate static binding and dynamic binding.
- When will a class be declared as final?
- When will a method be declared final?
- What is an abstract class?
- What is the need for abstract classes?
- Explain about protected visibility control.
- What are the methods under "object" class / java.lang.Object.
- Explain toString method of object class.
- What is reflection?
- What are the uses of reflection in Java.
- How will you create an instance of Class.
- What are the methods under reflection used to analyze the capabilities of classes?
- How to create arrays dynamically using reflection package.
- Define an interface.
- What is the need for an interface?
- What are the properties of an interface?
- Differentiate Abstract classes and interface.
- What is object cloning?
- Differentiate cloning and copying.
- Differentiate shallow copy and deep copy in cloning.
- Does Inheritance removes any fields/or methods of super class?
- Mention the use of final keyword.
- What is nested class? Mention its types.
- What is inner class?
- What is the need for inner classes?
- What are the rules for inner class?
- What is local inner class and anonymous inner class? Give their advantages.
- Write the advantages and disadvantages of static nested class.
- Define proxies.
- Write the application of proxies.
- What are the properties of proxy classes?
PART B
- Explain the concept of inheritance and its types.
- Explain the concept of overriding with examples.
- What is dynamic binding? Explain with example.
- Explain the uses of reflection with examples.
- Define an interface. Explain with example.
- Explain the methods under “object” class and “class” class.
- What is object cloning? Explain deep copy and shallow copy with examples.
- Explain static nested class and inner class with examples.
- With an example explain proxies.
- Develop a message abstract class which contains playMessage abstract method. Write a different sub-classes like TextMessage, VoiceMessage and FaxMessage classes for to implementing the playMessage method.
- Develop a abstract Reservation class which has Reserve abstract method. Implement the sub-classes like ReserveTrain and ReserveBus classes and implement the same.
- Develop an Interest interface which contains simpleInterest and compInterest methods and static final field of Rate 25%. Write a class to implement those methods.
- Develop a Library interface which has drawbook(), returnbook() (with fine), checkstatus() and reservebook() methods. All the methods tagged with public.
- Develop an Employee class which implements the Comparable and Cloneable interfaces. Implement the sorting of persons (based on name in alphabetical). Also implement the shallow copy (for name and age) and deep copy (for DateOfJoining).
- Explain the different methods supported in Object class with example.
- Explain the methods supported in Class class.
- Explain the Methods supported in reflect package. Also write a program to implement the reflection of a particular class details like constructors, methods and fields with its modifiers.
- Develop a static Inner class called Pair which has MinMax method for finding min and max values from the array.
- What is proxy class? Develop a code for constructing a proxy objects to trace a binary search method with explanations.
UNIT III
PART A
- Draw the inheritance hierarchy for the frame and component classes in AWT and Swing.
- What are the advantages of using swing over awt?
- How do achieve special fonts for your text? Give example.
- Give the syntax of drawImage() and copyArea() methods.
- What is Adapter class?
- Draw the AWT event Hierarchy.
- What are the swing components?
- What are the methods under Action Interface.
- What are the methods under WindowListener Interface.
- What is the difference between Swing and AWT?
PART B
- Explain the classes under 2D shapes.
- Explain event handling with examples.
- Explain action event with an example.
- What are the swing components. Explain.
- Describe the AWT event hierarchy.
UNIT IV
PART A
- What is generic programming?
- What are Checked and UnChecked Exception?
- What are checked exceptions?
- What are runtime exceptions?
- What is the difference between error and an exception?
- What classes of exceptions may be caught by a catch clause?.
- If I want an object of my class to be thrown as an exception object, what should I do?
- How to create custom exceptions?
- What are the different ways to handle exceptions?
- What is the purpose of the finally clause of a try-catch-finally statement?
- What is the basic difference between the 2 approaches to exception handling.
- Is it necessary that each try block must be followed by a catch block?
- How does Java handle integer overflows and underflows?
PART B
- Explain generic classes and methods.
- Explain exception hierarchy.
- What are the advantages of Generic Programming?
- Explain the different ways to handle exceptions.
- How Java handle overflows and underflows?
UNIT V
PART A
- Describe synchronization in respect to multithreading.
- Explain different way of using thread?
- What is synchronization and why is it important?
- When a thread is created and started, what is its initial state?
- What are synchronized methods and synchronized statements?
- What is daemon thread and which method is used to create the daemon thread?
- What method must be implemented by all threads?
- What kind of thread is the Garbage collector thread?
- What is a daemon thread?
- What is a thread?
- What is the algorithm used in Thread scheduling?
- What are the different level lockings using the synchronization keyword?
- What are the ways in which you can instantiate a thread?
- What are the states of a thread?
- What are the threads will start, when you start the java program?
- What are the different identifier states of a Thread?
- Why do threads block on I/O?
- What is synchronization and why is it important?
PART B
- Explain the different states of a thread.
- Explain thread synchronization with examples.
- Explain the algorithm used for thread scheduling.
- Describe multi threading.
- Explain Deadlocks.
adcszfcav
ReplyDeleteWow!! Stunning consequences from cheap niche edit!! I’m in no way contacting all of us else!
ReplyDeleteI definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work. programming chair
ReplyDeleteThanks for the blog loaded with so many information. Stopping by your blog helped me to get what I was looking for. HTML Tutorial
ReplyDeleteTheir development expertise and flexible mindset were fantastic assets.
ReplyDeletetop webdesign companies
Their thoughtful and disciplined approach resulted in a beautiful platform. top app design agency
ReplyDeleteYour website is for sure worth bookmarking.
ReplyDeletedigital web agencies
Well, I have got the best information from here the site is fully stuffed with the knowledgeable information.
ReplyDeleteweb design studio
Full IDM Tools Free Latest Reviews & Details Soft Links Version Here
ReplyDeleteSoftware PC Tools Latest (Full Version)A Platform for solution about PC Software Like Windows, Mac Apps, Android apks, asking for license key
ReplyDeleteUnlock the World of Technology with SoftwareFilesClub – Your Ultimate Destination for All Things Software
ReplyDeleteAll Soft Crack Tool & Mac Latest Version Free Download Here
ReplyDeleteUnlock the Power of Technology with SoftwareConversionTools.com – Your Ultimate Guide to PC Software and Latest Tech Trends!
ReplyDelete