Classes and constructors


Q1.

a) Describe the drawPolygon() method of Polygon class with the help of an illustration.

b) Describe the three UI components of swing and their classes and constructors.

Q2.

a) What do you mean by ‘finally’ block? When and how is it employed? Give an appropriate illustration.

b) Write down a Java program to copy one file to the other file with the help of byte stream classes.

Q3.

a) What do you mean by the term exception? How are they handled in the Java? Describe try-catch-finally block with an illustration.

b) Describe the access modifiers (private, public, protected and default) which are used in inheriting the classes in JAVA.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Classes and constructors
Reference No:- TGS010269

Expected delivery within 24 Hours