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

Java Assgn3

java assignment

Uploaded by

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

Java Assgn3

java assignment

Uploaded by

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

ACS College of Engineering, Bangalore

Affiliated to VTU, Accredited by NAAC with ‘A’ Grade, Accredited by


NBA BE Computer Science and Engineering Department
Assignment – III

Max. Marks: 10 SEM: III


Sub. Code: BCS306A Subject: Oops with JAVA

1. Define an exception. What are the key terms used in exception handling?
2. Explain the concept of importing packages in Java and provide an example
demonstrating the usage of the import statement.
3. Write a program that contains one method that will throw an Illegal Access
Exception and use proper exception handles so that the exception should be
printed.
4. How do you create your own exception class? Explain with a program.
5. Demonstrate the working of a nested try block with an example.
6. What do you mean by a thread? Explain the different ways of creating threads.
7. What is the need of synchronization? Explain with an example how
synchronization is implemented in JAVA
8. Discuss values() and value Of() methods in Enumerations with suitable
examples
9. What is multithreading? Write a program to create multiple threads in JAVA.
10.Explain with an example how inter-thread communication is implemented in
JAVA.
11.Explain auto-boxing/unboxing that occurs in expressions and operators.
12.Summarize the types of wrapping supported by java
13.Develop a java program to create a class myThread. Call the base class
constructor in this class’s constructor using super and start the thread. The run
method of the class starts after this. It can be observe that both man thread and
created child thread are executed concurrently/
14.Define a thread. Also discuss the different ways of creating a thread.
15.Built a java program for a banking application to throw an exception , where a
person tries to withdraw the amount even though he/she has lesser than
minimum balance (create a custom exception)

You might also like