Skip to content
VUBuddy

CS506 Midterm MCQs by Waqas Qureshi

Web Design and Development PDF 1.1 MBUpdated 23 Oct 2026
Midterm past paper CS506 Midterm MCQs by Waqas Qureshi PDF 1.1 MB
vubuddy.com
Type
Midterm past paper
Course
CS506 Web Design and Development
Size
PDF 1.1 MB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 1.1 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 1, 3, 4 of 26. Download the file for all 26 pages.

Learning4help by Waqas

Asslam-o-Alaikum! In this file we’ll provide you CS506 Most Important &100%

Correct Midterm MCQs Verified by Myself and Handouts As well. Must Prepare Before Midterm Exams.

If you found mistake then let us know.

Or You can send us Gmail: Learningn4help

For more educational stuff keep visiting

Q1. Which of the following statements is true regarding Vectors with no specified base type?

  1. A base type is needed, because Java needs to know how to allocate memory.
  2. If a base type is not specified the code will not compile.
  3. No base type is needed, because Java will use the Object class as a base type.
  4. No base type is needed because Vectors default to storing String objects.

Correct answer: No base type is needed, because Java will use the Object class as a base type.

Q2. Aside from the Scanner class, which of the following classes can be used for text-file file input?

  1. ObjectInputStream
  2. BufferedReader
  3. StringTokenizer
  4. None of these

Correct answer: BufferedReader

Q3. You can ---------to a network using sockets.

  1. Read
  2. Write
  3. Read/Write
  4. None of these

Correct answer: Read/Write

Q4. To create DataBaseMetaData object we write following line of code

  1. ResultSetMetaData rsmd = rs.getMetaData();
  2. DataBaseMetaData db = con.getMeataData();
  3. ResultSetMetaData rsmd = rs.setMetaData();
  4. DataBaseMetaData db = con.setMeataData();

Correct answer: DataBaseMetaData db = con.getMeataData();

Q5. Which of the following are passed as an argument to the paint ( ) method?

  1. A Canvas object
  2. An Image object
  3. A Graphics object
  4. A paint object

Correct answer: A Graphics object

Q6. Please choose one Java developed in----------------------

  1. 1990
  2. 1995
  3. 1997
  4. 2000

Correct answer: 1995

Q7. Socket is a --------------communication channel between hosts.

  1. Uni-directional
  2. Bi-directional
  3. Multi-directional
  4. None of these

Correct answer: Bi-directional

Q8. Event source can have --------- listeners registered on it.

  1. Single
  2. Double
  3. Multiple
  4. Triple

Correct answer: Multiple

Q9. The code below draws a line. What color is the line? g.setColor(Color.red.green.yellow.red); g.drawLine(0, 0, 100,100);

  1. Red
  2. Green
  3. Yellow
  4. Black

Correct answer: Black

Q10. Which of the following methods are invoked by the AWT to support paint and repaint operations?

  1. paint( )
  2. repaint( )
  3. draw( )
  4. redraw( )

Correct answer: paint( )

Q11. A serializable class must implement the method(s) _________.

  1. readObject and writeObject
  2. Either readObject or writeObject, or both, depending upon the desired behavior
  3. None of the given option
  4. No need to implement any method

Correct answer: No need to implement any method

Q12. A member variable or method prefixed by the protected access modifier can be accessed:

  1. Within the same class
  2. Within the sub-class
  3. All of the above
  4. Within the same package

Correct answer: All of the above

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.