Skip to content
VUBuddy

CS506 Midterm Objective

Web Design and Development PDF 254 KBUpdated 23 Oct 2026
Midterm past paper CS506 Midterm Objective PDF 254 KB
vubuddy.com
Type
Midterm past paper
Course
CS506 Web Design and Development
Size
PDF 254 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 254 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, 3 of 19. Download the file for all 19 pages.

Solved MCQS · From Midterm Papers · April 28,2012 · PSMD01 · Spring 2010

If we remove static from main then program __________

  1. Program cannot compile
  2. Program will compile and work properly
  3. Run time errors

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

Java developed in __________

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

Correct answer: 1995 (Page 12)

Fall 2008

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

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

When defining a method you must include a ___________ to declare any exception that might be thrown but is not caught in the method.

  1. try block
  2. finally block
  3. catch block

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

  1. ObjectInputStream
  2. StringTokenizer
  3. None of these

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

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

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

  1. Read
  2. Write
  3. Read/Write (Page 222)
  4. None of these

Correct answer: Read/Write (Page 222)

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

  1. Uni-directional
  2. Bi-directional (Page 211)
  3. Multi-directional
  4. None of these

Correct answer: Bi-directional (Page 211)

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

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

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

To create DataBaseMetaData object we write following line of code

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

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

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.