Java Assignment 4

Posted By on September 14, 2014

Download PDF
JAVA Question Bank

1. Write a program that counts the no. of words in a text file. The file name is passed as a command line argument. The program should check whether thefile exists or not. The words in the file are separated by white space characters.

2. Explain difference between String class and String Buffer class.

3. Explain following keyword or short notes:

a. Static

b. Final

c. Finalizer

4. Write a program to create directories (/home/abc/bcd/def/ghi/jkl) in the homedirectory /home/abc and list the files and directories showing file/directory,file size. Read-write-execute permissions. Write destructor to destroy thedata of a class.

5. Explain File constructors, and any ten methods of class File and method seek.

6. A protected data or method can be accessed by any class in the same package.Justify.

7. There is no destructor in Java. Justify.

8. What are Java classes? How we can create java classes.

9. What is object? How we can create java objects?

10. Explain accesss pecifiers and compare their scope in tabular format.

11. What is Java string? How we can initialize and create java string explains with 10 methods?

12. String class in immutable explain.

13. Explain Java Character class with suitable example and methods

JAVA Question Bank

Download PDF

Posted by Akash Kurup

Founder and C.E.O, World4Engineers Educationist and Entrepreneur by passion. Orator and blogger by hobby