Sunteți pe pagina 1din 5

Code No: RR411901 Set No.

1
IV B.Tech I Semester Supplementary Examinations, February 2007
INTERNET & JAVA
(Electronics & Computer Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) Describe the general structure of a Java program with the help of an example
program. [8]
(b) Why class name is same name as file name in Java ? [4]
(c) What is the use of import statement in Java? Explain [4]

2. (a) Describe the guidelines for Java programming style and documentation. [10]
(b) Java is a freeform language . Comment . [6]

3. (a) What is the purpose of a method ? How do you declare a method ? How do
you invoke a method ? [8]
(b) Define method abstraction in Java ? Write a Java program to implement
method abstraction. [8]

4. (a) How do classes help us to organize our programs ? [8]


(b) What are objects ? How they are created from a class ? [8]

5. (a) What is the purpose of StringTokenizer class? Name the interface it imple-
ments? [5]
(b) Detail the constructors in the StringTokenizer class. What are the packages
that define String Buffer and StringTokenizer classes? [5]
(c) Write an example program to illustrate its usage. [6]

6. Differentiate the following terms :-

(a) single inheritance Vs multiple inheritance [4]


(b) this Vs super [4]
(c) overloading Vs Overriding [4]
(d) abstract method Vs interface. [4]

7. Write an applet to draw the following shapes with different colour,

(a) Ellipse [2]


(b) Polygon [2]
(c) Cube [2]

1 of 2
Code No: RR411901 Set No. 1
(d) Cylinder. [2]
(e) Cylender [2]
(f) Star [2]
(g) Circle inside a square [2]
(h) Circle outside a square [2]

8. Write a Java program at server side that will receive a connection from a client,
send a string to the client and closes the connection. Explain the program. [16]

⋆⋆⋆⋆⋆

2 of 2
Code No: RR411901 Set No. 2
IV B.Tech I Semester Supplementary Examinations, February 2007
INTERNET & JAVA
(Electronics & Computer Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) What is Java Environment ? What are its features? [6]


(b) What is Application Program Interface? List most commonly used packages
of Java? [10]

2. (a) Describe the guidelines for Java programming style and documentation. [10]
(b) Java is a freeform language . Comment . [6]

3. (a) Write a Java program to reverse a given integer. [8+8]


(b) Write proper syntax explain the following control statements with syntax in
Java.
i. if....else statement
ii. if....switch statement

4. (a) Define a class in Java. How classes & objects can be in Java programs.
Illustrate with example. [10]
(b) Write down the usage of finalize () method. [6]

5. (a) What is a vector ? How it different from array? [6]


(b) Write a Java program that reads 10 integers from keyboard and prints the
maximum and minimum of these 10 values. [10]

6. (a) What is an interface? What are the similarities and differences between inter-
faces and classes? [6]
(b) How to design and implement an interface? [4]
(c) Give an example where interface can be used to support multiple inheritance.
[6]

7. Write a Java program create a Simple calculator . [16]

8. (a) What is Random Access File ? How it is different from a Sequential file ? [8]
(b) List the constructors for random access files. Illustrate with a simple example.
[8]

⋆⋆⋆⋆⋆

1 of 1
Code No: RR411901 Set No. 3
IV B.Tech I Semester Supplementary Examinations, February 2007
INTERNET & JAVA
(Electronics & Computer Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) What is Java Environment ? What are its features? [6]


(b) What is Application Program Interface? List most commonly used packages
of Java? [10]

2. (a) Describe the guidelines for Java programming style and documentation. [10]
(b) Java is a freeform language . Comment . [6]

3. (a) How a for loop can be defined and used within the program? Explain with
suitable examples. [6]
(b) Write a java program to find G.C.D of two numbers. [10]

4. (a) What is the need for member function or method inside a class? Explain the
procedure to define and add a method to a Java class. [10]
(b) What are the restrictions on static methods? [6]

5. Write an application that inputs a line of text tokenizes the line with an object of
class StringTokenizer and outputs the tokens in reverse order [16]

6. Differentiate the following terms :-

(a) single inheritance Vs multiple inheritance [4]


(b) this Vs super [4]
(c) overloading Vs Overriding [4]
(d) abstract method Vs interface. [4]

7. (a) What is AWT? What is component object in the Java AWT? [4]
(b) What is the default layout for an applet; flame and panel? [4]
(c) Explain the class hierarchy of various window types [4]
(d) What is window and what are the operations of windows. [4]

8. (a) Explain what is meant by the terms client and server [5]
(b) How are different machines in a network addressed? [5]
(c) What is a port? What is the difference between a port and a socket? [6]

⋆⋆⋆⋆⋆

1 of 1
Code No: RR411901 Set No. 4
IV B.Tech I Semester Supplementary Examinations, February 2007
INTERNET & JAVA
(Electronics & Computer Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE Questions
All Questions carry equal marks
⋆⋆⋆⋆⋆

1. (a) What is Java Environment ? What are its features? [6]


(b) What is Application Program Interface? List most commonly used packages
of Java? [10]

2. (a) Discuss the different types of literals available in Java.? [8]


(b) What are separators ? Describe the various separators in Java ? [8]

3. (a) Write a note on labeled loops in Java with suitable examples. [6]
(b) Illustrate usage of different kinds of jump statements break, continue and
return statement in Java program with examples. [10]

4. (a) Define a class in Java. How classes & objects can be in Java programs.
Illustrate with example. [10]
(b) Write down the usage of finalize () method. [6]

5. Write an application that inputs a line of text tokenizes the line with an object of
class StringTokenizer and outputs the tokens in reverse order [16]

6. (a) Explain the significance of throw statement with an example. [5]


(b) Explain about re-throwing an exception with an example. [6]
(c) What is a finally block ? When and how is it used ? [5]

7. (a) What are the differences between a component and a container. [8]
(b) What are the differences between a Panel and a Canvas, illustrate with an
example. [8]

8. (a) Write about Buffered Writer Class. [4]


(b) Write a Java Program to read a text and find out how many words and how
many characters are there in the text using Buffered Reader? [8]
(c) Discuss the methods available in the Pushback Reader. [4]

⋆⋆⋆⋆⋆

1 of 1

S-ar putea să vă placă și