Skip to content
VUBuddy

CS506 Midterm Solved MCQs by Junaid

Web Design and Development PDF 1.3 MBUpdated 23 Oct 2026
Midterm past paper CS506 Midterm Solved MCQs by Junaid PDF 1.3 MB
vubuddy.com
Type
Midterm past paper
Course
CS506 Web Design and Development
Size
PDF 1.3 MB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 1.3 MB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 2, 3, 4 of 51. Download the file for all 51 pages.

Q1. Which of the following feature provides the facility for multiple inheritance?

  1. Adapter classes
  2. Wrapper classes
  3. Collections
  4. setColor() is a method of

object.

  1. JPanel
  2. JFrame
  3. Image

Q3. If we want to animate something like ball, moving from one place to another. we constantly need to call paint () method.

  1. True
  2. If we want to call to String() method of parent class in JAVA. Which of the following statement will be used?
  1. this. to String();
  2. new. to String();
  3. sub. to String();

Q5. Which of the following syntax is used to create a client socket?

  1. Socket s = new Socket(“serverName”);
  2. Socket s = new Socket(serverport);
  3. Socket s = new Socket(“serverName”, serverPort); page No 195
  4. Socket s = new Socket(serverPort, “serverName”);

Correct answer: Socket s = new Socket(“serverName”, serverPort); page No 195

Q6. In order to include graphics in your Java program, it is mandatory to extend from class.

  1. JLabel
  2. JFrame
  3. JPanel
  4. JButton
  5. super.to String(); p
  6. False
  7. Graphics
  8. Interfaces
  9. What will happen if static modifier is removed from the signature of main method?
  1. The program does not compile
  2. The program compiles and runs successfully
  3. None of given options

Q8. Timer class constructor requires time in

  1. seconds
  2. milli seconds

Correct answer: milli seconds

Page No 180. c. micro seconds d. nano seconds

Q9. Which of the following features is available in java?

  1. Pointers
  2. Operator overloading
  3. Global variables
  4. Primitive data types Page No 40.

Correct answer: Primitive data types Page No 40.

Q10. ResultSet Meta Data will help you in answering the following questions except;

  1. How Many columns are in the ResultSet?
  2. What is the name of given column?
  3. How many rows are in the ResultSet?

Correct answer: How many rows are in the ResultSet?

Page No 162. d. Are the column name is case sensitive? 11. returns the elements at specified position in the list.

a. Object get(int index)

Page No 62. b. Object set(int index) c. Object return(int index) d. Object remove(int index)

  1. WindowListener interface contains methods. a. Four b. Six

c. Seven

d. Eight

c. The program compiles but does not run

Google

Q13. Which of the following driver type(s) has better performance than other?

  1. Type 1: JDBC - ODBC Bridge
  2. Type 2: Native - API/partly Java driver
  3. Type 3: Net - protocol/all-Java driver

Q14. Which of the following syntax is used to create a Server Socket?

  1. ServerSocket ss = new ServerSocket(“serverName”);
  2. ServerSocket ss = new ServerSocket(serverPort); page No 197
  3. ServerSocket ss = new ServerSocket(“serverName”, serverPort);
  4. ServerSocket ss = new ServerSocket(serverPort, “serverName”); 15. The keyword "this" is used to
  5. invoke constructor of the another class
  6. invoke constructor of super class from sub class
  7. invoke constructor of sub class from

Correct answer: ServerSocket ss = new ServerSocket(serverPort); page No 197

super class 16. An applet can be defined as:

a. A small program written in Java and included in an HTML page page 182

b. A small program written in JSP and included in an HTML page c. A small program written in Servlet and included in an HTML page d. A small program written in JSF and included in an HTML page

Q17. Choose the correct syntax to define an interface named as "Speaker" in java language

  1. public class Speaker{}
  2. public interface class Speaker{}
  3. public Speaker class interface{}

Q18. Teacher java class wants to inherit from Employee.java class, keyword should public static void main (String args[]){

  1. public interface Speaker{}
  2. invoke alternate constructor of the same class
  3. Type 4: Native - protocol/all-java driver
All CS506 files →
CS506 Web Design and Development All CS506 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.