0% found this document useful (0 votes)
31 views1 page

Assignment 3

This document contains 11 questions related to object-oriented programming concepts in Java such as inheritance, exception handling, string comparison, abstract classes vs interfaces, checked vs unchecked exceptions, primitive vs wrapper classes, this, super and final keywords, packages, method overloading and overriding, constructor overloading, polymorphism, arrays, and finding the maximum number in a list. The questions cover core OOP concepts, exception handling, strings, inheritance, abstraction, polymorphism and arrays in Java.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views1 page

Assignment 3

This document contains 11 questions related to object-oriented programming concepts in Java such as inheritance, exception handling, string comparison, abstract classes vs interfaces, checked vs unchecked exceptions, primitive vs wrapper classes, this, super and final keywords, packages, method overloading and overriding, constructor overloading, polymorphism, arrays, and finding the maximum number in a list. The questions cover core OOP concepts, exception handling, strings, inheritance, abstraction, polymorphism and arrays in Java.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Q1: What is use of inheritance and how many types of inheritance in java explain any one with suitable

example . how you can avoid class can’t be inherited.

Q2: What are the advantages of exception handling in Java? Describe Runtime Exception with the help of
an example. Differentiate between throw and throws in exception handling with example?
Q3: How do you compare two strings in a Java? Differentiate between String, StringBuffer and
Stringbuilder in Java.

Q4: What is difference between abstract class and interface in java with suitable example.
Interface variables are static and final by default in Java" - Support this statement with proper explanation.

Q5: what is differentiate between checked Exception and unchecked Exception? Write a program to handle
ArrayIndexOutOfBoundsException and AirthmeticException.
Q6: what is difference between primitive data type and wrapper classes. Why should we use wrapper
classes instead of primitives?
Q7: Demonstrate the uses of this, super and final keywords with suitable examples.
Q8: what is package? how you can import any user defined package in your own class.

Q9: Compare and contrast between method overloading and method overriding with suitable examples.
Write a program to implement Constructor Overloading.

Q10: Write a program to create a class named Shape. This class has three sub-classes Circle, Triangle and
Square. Each class has two member functions named draw() and erase(). Create these using runtime
polymorphism concepts.

Q11: What is array and how you can initialize the two dim arrays. WAP to find maximum in given list of
numbers.

Assignment -3: Oops with java

You might also like