• No results found

What is the difference between PATH and CLASSPATH variables? 10

N/A
N/A
Protected

Academic year: 2022

Share "What is the difference between PATH and CLASSPATH variables? 10"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

Unit 1,2,3,4,5 1. List three jdk tools and explain their use.

2. Why Java is platform independence?

3. What are the features of Java which makes it different from other programming languages?

4. Explain the structure of Java source file and main method.

5. Write a program in Java to print the factorial of a number using recursion.

6. Write a program in Java for division of two integers? What can be the limitations of your program?

7. What is a command line argument? How command line argument in Java differs from C.

8. Comment on the following statement ”Java is a simple, object oriented, distributed, interpreted, robust, secure, architecture neutral, portable, high performance, multi-threaded, dynamic programming language”.

9. What is the difference between PATH and CLASSPATH variables?

10. What is the importance of declaring members of a class as static? What are its limitations?

11. What are wrapper classes? Give three examples

12. Is Java a pure object oriented programming language? Justify your views.

13. Compare constructor with method?

14. Java does not support destructor. Why?

15. What are the advantages and disadvantages of using static members?

16. What is inheritance? And what is its importance in software development explain with an example.

17. What do you mean by call by value and call by reference? How they are implemented in Java?

18. What is the use of the keyword “super” and “this”?

19. There is a class from which all other classes are derived? List few methods of that base class which are inherited by all sub classes?

20. Write short notes on (a) static (b) final (c) native 21. Differentiate between

(a) Concrete class and abstract class (b) Interface and abstract class (c) Overloading and overriding (d) Multilevel and multiple inheritance

22. What do you mean by early binding and late binding? Support your answer with example.

23. Why do we need to create a package? Write the steps involved in creating a user defined package?

(2)

24. Write a program in java. A class teacher contains two fields name and qualification extends this class to a class called Dept which has fields DNo and DName. An interface named as college with field

CollegeName. Using the above classes and interfaces get the appropriate information and display it.

25. What is an exception and what are the different categories of exception?

26. Write a program to demonstrate the use of exception 27. Write short notes on

(a) Throw (b) Throws (c) Finally (d) getMessage() (e) printStackTrace()

28. Write a program that creates a meaning full user defined exception and throws and handles it suitably

1. What are the advantages of multi-threading?

2. What are the different ways to create multiple threads in Java?

3. Explain thread lifecyle with a suitable diagram.

4. differentiate between socket and serversocket class.

6. Write a socket based program for copying files form one machine to another.

7. Write a socket based program for getting time and date from the server machine.

8. Explain the RMI communication model?

10. What are the steps involved in writing and executing an RMI based application?

11. Write a program for copying file from one directory to another. The source and the destination are given as command line arguments.

12. Write a file based program for the following

(a) Accept student details and store it in a file student.txt (b) Search for details of an existing student given its roll number from the file student.txt (c) Delete the details of a student given its roll number from the file student.txt (d) Display the contents of the file student.txt

13. Write a GUI based application for addition of two numbers using JFrame, JTextFields, JLabel and JButton classes.

14. Write a GUI based login page for any java application. Assume that for successful login the username and passord has to be same.

Q1. Explain the Life Cycle of Thread. What is Multithreading?

Q2. What are AWT components? How printing is done using AWT components. Explain with the help of suitable example.

Q3. Discuss with suitable example, how a client application would read a file from a server through a URL connection.

(3)

Q4. Write a function to create a database connection and retrieve all the records from a table that has name=”RAHUL”.

A) Discuss with suitable example, how a client application would read a file from a server through a URL connection.

B) With reference to sockets, explain how client/server communication is accomplished in Java.

Q2. A) Write a program to connect to a database query and display the result.

Discuss the various types of JDBC drivers.

Q3. A) What is RMI? Differentiate between stub and skeleton with suitable example.

Q4. A) Discuss various swing components with implementation (any two):

a) Lists b) Trees c) Styled Text Components

B) Write an application to implement trees and progress indicators.

(4)

Q1. Discuss various swing components with implementation:

a) Lists b) Trees

c) Styled Text Components

Q2. What are AWT components? How image manipulation is done using AWT components?

Q4. Write short note:

a) Class Loader

b) Byte Code Varification

a) Explain the Life Cycle of Thread. What is Multithreading?

b) Using suitable code segment differentiate between Static import and import.

Give the use of following methods of Statement interface- i) executeQuery

ii) executeUpdate iii) execute

a) Write a suitable code segment to copy one file’s contents to other file using File Streams.

a) What is Internet addressing? Give the purpose of InetAddress class.

b) What is a network socket? Also give use of server socket and client socket a) Explain the following terms with respect to exception handling-

try, catch, throw, finally

b) Give suitable code segment to explain String class methods.

Create a class Person with following members:

c) Person name, d) Person address, e) Person age

f) Person contact number

(5)

Create a class Student which derives the features of class person having additional members like a) Student class,

b) Student course name, c) Student college name d) Student class teacher.

Create a class Teacher which derive the features of class Person having additional members like a) Teacher’s department,

b) Teacher class c) Teacher’s subject

Write a class to test and initialize the methods for all classes with following functions.

-- Functions to initialize data members or use constructor(Use of super) to initialize -- Function to show data

-- Function to print the faculty associated with student

a) Describe the various levels of access protection available for packages b) Discuss various swing components with implementation:

a) Lists b) Trees

c) Styled Text Components

a) Define the following terms i) Static method

ii) Garbage Collection b) Distinguish between

i) Inputstream and Reader classes ii) Outputstream and Writer classes

References

Related documents