Skip to content
VUBuddy

CS506 Midterm Solved Objective Papers Preparation

Web Design and Development PDF 491 KBUpdated 23 Oct 2026
Midterm past paper CS506 Midterm Solved Objective Papers Preparation PDF 491 KB
vubuddy.com
Type
Midterm past paper
Course
CS506 Web Design and Development
Size
PDF 491 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 491 KB

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, 2, 4 of 20. Download the file for all 20 pages.

CS506 Web Design and Development Solved Objective Midterm

Papers For Preparation of Midterm Exam

Q1. ( Marks: 1 ) - Please choose one

If we remove static from main then program _

  1. Program cannot compile
  2. Program will compile and work properly
  3. Run time errors
  4. Exception throws in main

Q2. ( Marks: 1 ) - Please choose one

If we remove String array from main then program

  1. Program cannot compile
  2. Program will compile and work properly
  3. Exception throws in main

Q3. ( Marks: 1 )

Please choose one Java developed in

  1. 1990
  2. 1995 (Page 12)
  3. 1997

Fall 2008

Q1. Which of the following methods are invoked by the AWT to support paint and repaint operations? (1 marks)

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

Correct answer: paint( )

Q2. When defining a method you must include a (1 marks)

to declare any exception that might be thrown but is not caught in the method.

  1. try block
  2. finally block
  3. catch block
  4. throws-clause

Correct answer: throws-clause

Q3. Aside from the Scanner class, which of the following classes can be used for text-file file input? (1 marks)

  1. ObjectInputStream
  2. StringTokenizer
  3. None of these

Q4. Which of the following statements is true regarding Vectors with no specified base type? (1 marks)

  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 Vectors default to storing String objects.

Q5. A serializable class must implement the method(s) (1 marks)

  1. readObject and writeObject
  2. Either readObject or writeObject, or both, depending upon the desired behavior

Q6. You can ---------to a network using sockets. (1 marks)

  1. Read
  2. Write
  3. Read/Write

Correct answer: Read/Write

(Page 222)

  1. None of these

Q7. Socket is a --------------communication channel between hosts. (1 marks)

  1. Uni-directional
  2. Bi-directional

Correct answer: Bi-directional

(Page 211)

  1. Multi-directional
  2. None of these

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

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

Correct answer: A Graphics object

Q9. The code below draws a line. What color is the line? g.setColor(Color.red.green.yellow.red); (1 marks)

g.drawLine(0, 0, 100,100);

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

Correct answer: Black

Q10. To create DataBaseMetaData object we write following line of code (1 marks)

  1. DataBaseMetaData db = con.getMeataData();

(Page 177)

  1. ResultSetMetaData rsmd = rs.getMetaData();
  2. ResultSetMetaData rsmd = rs.setMetaData();
  3. DataBaseMetaData db = con.setMeataData();
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.