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

JAVA

The document contains 6 questions on Java topics like classes, objects, operators, constructors, inheritance, threads, exceptions, streams, files and more. Detailed explanations and examples are provided for concepts like method overloading, overriding, interfaces, packages, applets vs applications and more. Coding programs are included for threads, exceptions, files and more.

Uploaded by

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

JAVA

The document contains 6 questions on Java topics like classes, objects, operators, constructors, inheritance, threads, exceptions, streams, files and more. Detailed explanations and examples are provided for concepts like method overloading, overriding, interfaces, packages, applets vs applications and more. Coding programs are included for threads, exceptions, files and more.

Uploaded by

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

JAVA

Q1-

1. Define the terms with example i) Class ii) Object


2. Enlist any two logical operators and two bitwise operators.
3. Define constructor. List its types
4. List access specifiers in Java (explain 4 marks)
5. List the types of inheritances in Java.
6. Give a syntax of 〈param〉 tag to pass parameters to an applet
7. Define stream class. List its types.

Q2–

1. Explain any four features of Java


2. Differentiate between string and string buffer class
3. Explain the two ways of creating threads in Java
4. Describe Life cycle of thread with suitable diagram

Q3–

1. Describe the use of following methods: (i) Drawoval ( ) (ii) getFont ( ) (iii) drawRect ( ) (iv)
getFamily ( ) v. drawLine ( ) vi) drawArc ( ) vii. drawPolygon ( )
2. Explain the applet life cycle with neat diagram.
3. Differentiate between Byte Stream Class and Character Stream Class.
4. Define type casting. Explain its types with syntax and example

Q4–

1. Differentiate between array and vector.


2. Differentiate between method overloading and method overriding
3. Describe interface in java with suitable example.
4. Define packages.Explain how to create a package and how to import it.
5. Differentiate between Java Applet and Java Application
6. Write a program to copy content of one file to another file

Q5–

1. Explain vector with the help of example. Explain any four methods of vector class with
example.
2. Explain the concept of Dynamic method dispatch with suitable example.
3. Write a program to print even and odd number using two threads with delay of 1000ms after
each number.
4. Write a program that throws an exception called “NoMatchException” when a string is not
equal to “India”.

Q6–

1. Define thread priority ? Write default priority values and the methods to set and change
them.
2. What is constructor? List types of constructor. Explain paramaterized constructor with
suitable example.

Honourable mentions –

1. Distinguish between Input stream class and output stream class


2. Write a program to perform following task. (i) Create a text file and store data in it. (ii)
Count number of lines and words in that file.
3. Describe final variable and final method
4. Differentiate between class and interfaces.
5. Explain any four methods of string class
6. Explain exception handling mechanism. w.r.t. try, catch, throw and finally.
7. Mention the steps to add applet to HTML file. Give sample code.
8. Enlist any four methods of file input stream class and give syntax of any two methods.
9. Write a program to create a user defined exception in java.
10. Write a program to show the use of copy constructor
11. Write a program to display ASCII value of a number 9

You might also like