Skip to content
VUBuddy

CS506 Quiz 3

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

Q1. In the context of Java Thread, sleep() method throws __________ exception.

  1. Input Output
  2. Interrupted
  3. Index Out of bound
  4. File not found

Correct answer: Interrupted

Q2. Which of the following method allows any other thread of same priority to execute?

  1. wait()
  2. sleep()
  3. yield()
  4. notify()

Correct answer: yield()

Q3. Which of the following objects is passed as an argument to paintComponent() method?

  1. JPanel object
  2. Graphics object
  3. JFrame object
  4. Image object

Correct answer: Graphics object

Q4. If a JPanel has a triangle drawn on it then which of the following methods will display it?

  1. paintBorder( )
  2. paint( )
  3. paintChildern( )
  4. paintComponet( )

Correct answer: paintComponet( )

Q5. Which of the following method needs to override while handling threads in java?

  1. runnable()
  2. init()
  3. start()
  4. run()

Correct answer: run()

Q6. Which of the following statement is correct to assign maximum priority to thread “t2”?

  1. t2.setPriority(Thread.PRIORITY_MiX);
  2. t2.setPriority(Thread.MAX_PRIORITY);
  3. t2.setPriority(Thread.MIX_PRIORITY);
  4. t2.setPriority(Thread.PRIORITY_MAX)

Correct answer: t2.setPriority(Thread.MAX_PRIORITY);

Q7. Which of the following methods is called only once during the life cycle of an Applet?

  1. paint()
  2. start( )
  3. stop()
  4. destroy()

Correct answer: destroy()

Q8. Which of the following methods of Graphics object is used to draw rectangle?

  1. DrawReactangle(10,10,20,20);
  2. drawReactangle(10,10,20,20);
  3. drawRect(10,10,20,20);
  4. DrawRect(10,10,20,20);

Correct answer: drawRect(10,10,20,20);

Q9. Choose correct integer value for predefined Thread Priority "Thread.NORM_PRIORITY" in Java.

  1. 1
  2. 10
  3. 7
  4. 5

Correct answer: 5

Q10. In _____________ state, thread is assigned a processor to run.

  1. running
  2. dead
  3. ready
  4. new

Correct answer: running

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.