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 ? (c) What is the use of import statement in Java? Explain [4] [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 ? (b) What are objects ? How they are created from a class ? [8] [8]

5. (a) What is the purpose of StringTokenizer class? Name the interface it implements? [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. Differentiate the following terms :(a) single inheritance Vs multiple inheritance (b) this Vs super (c) overloading Vs Overriding (d) abstract method Vs interface. 7. Write an applet to draw the following shapes with different colour, (a) Ellipse (b) Polygon (c) Cube 1 of 2 [2] [2] [2] [4] [4] [4] [4] [6]

Code No: RR411901 (d) Cylinder. (e) Cylender (f) Star (g) Circle inside a square (h) Circle outside a square

Set No. 1
[2] [2] [2] [2] [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 . 3. (a) Write a Java program to reverse a given integer. [6] [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. 5. (a) What is a vector ? How it different from array? [6] [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 interfaces and classes? [6] (b) How to design and implement an interface? [4] [6] 7. Write a Java program create a Simple calculator . [16] (c) Give an example where interface can be used to support multiple inheritance.

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 (b) this Vs super (c) overloading Vs Overriding (d) abstract method Vs interface. 7. (a) What is AWT? What is component object in the Java AWT? (b) What is the default layout for an applet; flame and panel? (c) Explain the class hierarchy of various window types (d) What is window and what are the operations of windows. 8. (a) Explain what is meant by the terms client and server (b) How are different machines in a network addressed? (c) What is a port? What is the difference between a port and a socket? ⋆⋆⋆⋆⋆ [4] [4] [4] [4] [4] [4] [4] [4] [5] [5] [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.? (b) What are separators ? Describe the various separators in Java ? 3. (a) Write a note on labeled loops in Java with suitable examples. [8] [8] [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. (b) Explain about re-throwing an exception with an example. (c) What is a finally block ? When and how is it used ? 7. (a) What are the differences between a component and a container. [5] [6] [5] [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