Top 10 Most Downloaded Games on Play Store in 2024
Ppl home assignment_unit4
1. Bansilal Ramnath Agarwal Charitable Trust’s
Vishwakarma Institute of Technology, Pune-37
Principles of Programming Languages
CS 20105 – SE – E
Home Assignment 4
Assignment Date: 18th April 2012 Submission Date: 23rd April 2012
Answer all 9 questions:
1. Explain the connection between ‘package’, ‘import’ and ‘classpath’ in Java.
2. Write a Java program to print 1,2,3,4… till 100 and A,B,C… till Z, both in
parallel.
3. How to create a thread in Java using Runnable interface?
4. If a thread is in “blocked” state, what does it mean?
5. What is a deadlock? Explain with an example.
6. What is “synchronized” keyword in Java? When is it used? Where is it used?
Explain.
7. Write a Java program to read a file called “abc.txt” and print its contents on
the screen using FileInputStream class.
8. Write a Java program to read a file called “abc.txt” and print its contents on
the screen using FileReader class.
9. Write a Java program to keep reading lines of user input from the console
until the user inputs “-1”.
Page 1 of 1