• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 32 pages
Exam (elaborations)

CST 8284 Exam Questions and Correct Answers 100% Verified Graded A+

Document preview thumbnail
Preview 4 out of 32 pages

CST 8284 Exam Questions and Correct Answers 100% Verified Graded A+

Content preview

CST 8284 Exam Questions and Correct Answers 100% Verified Graded A+

c- 1. What pattern does the Java event model resemble.

a) Model-View-Controller

b) Simple Factory

c) Observer

d) None of the above



b- 1. Which of the following statements about adapters is

false.

a) An adapter class implements an interface.

b) An adapter class provides a default (empty) implementation of every method in

the interface.

c) Programmers override selected adapter methods.

d) A ComponentListener is a ComponentAdaptor.



c- 1. class Q6 {

2. public static void main(String args[]) {

3. Holder h = new Holder();

4. h.held = 100;

5. h.bump(h);

6. System.out.println(h.held);

7. }

,8. }

9.

10. class Holder {

11. public int held;

12. public void bump(Holder theHolder) { theHolder.held++; }

13. }

What value is printed out at line 6?

a) 0

b) 1

c) 101

d) 100



c- Which of the following does not generate GUI events.

a) Typing in a text field.

b) Selecting an item from a menu.

c) Viewing the text in a label.

d) Moving the mouse.



e- Assume that the class AcLis implements the ActionListener interface. The code
fragment below constructs a button and gives it four action listeners. When the button is pressed,
which action listener is the first to get its actionPerformed() method invoked?

Button btn = new Button("Hello");

2. AcLis a1 = new AcLis();

,3. AcLis a2 = new AcLis();

4. AcLis a3 = new AcLis();

5. AcLis a4 = new AcLis();

6. btn.addActionListener(a1);

7. btn.addActionListener(a2);

8. btn.addActionListener(a3);

9. btn.addActionListener(a4);

10. btn.removeActionListener(a2);

11. btn.removeActionListener(a3);

12. btn.addActionListener(a3);

13. btn.addActionListener(a2);




a) a1 gets its actionPerformed() method invoked first.

b) a2 gets its actionPerformed() method invoked first.

c) a3 gets its actionPerformed() method invoked first.

d ) a4 gets its actionPerformed() method invoked first.

e) It is impossible to know which listener will be first.



b- 1. You cannot access a database using a servlet.

a) True

b) False

, c- A typical servlet would output ____.

a) XML.

b) XSL.

c) HTML.

d) none of these. 1



b- When you want to listen for an event, you can implement an appropriate __________
for your class.

a) handler.

b) listener.

c) abstract class.

d) superclass.



c- The catch block that begins catch (Exception ex) can catch Exceptions of type.

a) IOException

b) ArithmeticException

c) both of these

d) neither of these



d- Which of the following statements about JPanels is false.

a) A JPanel is a JComponent.

Document information

Uploaded on
September 30, 2026
Number of pages
32
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$15.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Sold
22
Followers
0
Items
11309
Last sold
2 weeks ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions