Internet Programming Past Papers


Subject: Internet Programming (IT)

Time Allowed: 15 Minutes

Maximum Marks: 10

NOTE: Attempt this Paper on this Question Sheet only.  Please encircle the correct option. Division of marks is given in front of each question. This Paper will be collected back after expiry of time limit mentioned above.


Part-I Encircle the right answer, cutting and overwriting are not allowed. (10)

1. Threads share the execution time of their process.
a. Yes
b. No
2. In CSS, we can apply different styles to a class.
a. True
b. False
3. JSP stands for _______.
a. Java Super Pages
b. Java Super Program
¢. JavaServer Pages
d. Java Server Program
4. Static member functions and data members can be accessed in non-static member functions of the same class.
a. Yes
b. No
5. Response of a request in web-architecture contains _______.
a. Response Text
b. Status Code
c. both a & b
d. none of these
6. Byte code can be executed on different OS without compiling the code.
a. True
b. False
7. Super keyword can be used for calling ________.
a. multiple constructors
b. constructor of parent class
c. function of child classes
d. All of above
8. For each loop can ______ in forward direction.
a. move
b. not move
9. In java, instanceof is a/an______ operator.
a. binary
b. unary
c. both a & b
d. none of these
10. What will be the output of the program?
tev{ int x = 0/5; } catch (Exception e}{ System.out.printin(“Exception”); } catch (ArithmeticException ae){ System.out.printin(“Arithmetic Exception”); }
a. Finished
b. Exception
c. Compilation fails
d. Arithmetic Exception


Subject: Internet Programming (IT)

Time Allowed: 2 Hours 45 Minutes

Maximum Marks: 50



Part-II Give short answers, each question carries equal marks. (20)

Q#1: What is difference between static and constant variable in java?

Q#2: In event handling, what is the purpose of ActionListener interface?

Q#3: Write down a life cycle of java serviets.

Q#4: Write down the benefits of threading.

Q#5: What is the purpose of PreparedStatement object in JOBC?

Q#6: In CSS, how can we apply style to the components?

Q#7: What does JDBC and HTML stands for?

Q#8: How packages give benefits to the developer?

Q#9: In which cases, multiple inheritance is allowed in java?

Q#10: How can we achieve polymorphism in java?


Part-III Give detailed answers, each question carries equal marks. (30)

Q#1: Write a program in which a thread will be created. This thread will take a positive number as input from main thread and display all odd numbers from 0 to that number.

Q#2: Aclient wants to send a request to server for counting the maximum character used in a string. So, you have to make a server-client application, in which client sends a string to the server and server resends the maximum count of the character used. (Do your task with serialization method in which either you can use built-in class String or make your own string class).

For example:

  • Client: “Hello, Ali! How are you?”

Server: “1:3, 0:3”

  • Client: “I love Pakistan”

Server: “a:2”

Q#3: Write a JSP page, which will dynamically create a drop down list with all drinks along with their rates saved in data base.

O8 Nome: Dotabase

Table name: Beverages (drink_nome (vorChar(i5)), ratefint}))

500+ Computer Science Past Papers