Quiz 10

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What is a listener in context to event handling? A listener is a variable that is notified when an event occurs A listener is a object that is notified when an event occurs A listener is a method that is notified when an event occurs None

A listener is a object that is notified when an event occurs

Where can the event handling code be written? Same class Other class Anonymous class All options

All options

Which of these Exception handlers cannot be type parameterized? catch throw throws All options

All options

Generics does not work with? Set List Tree Array

Array

What are the differences between Swing and AWT? - A. The AWT component is considered to be heavyweight while Swing component are considered lightweights - B. The Swing GUI has pluggable look and feelwrong - Both A and B correct - None

Both A and B correct

Which is a component in AWT that can contain another components like buttons, text fields, labels etc.? Window Container Panel Frame

Container

Why are generics used? - Generics make the code faster - Generics make the code more optimized and readable - Generics add stability to your code by making more of your bugs detectable at compile timecorrect - Generics add stability to your code by making more of your bugs detectable at the runtime

Generics add stability to your code by making more of your bugs detectable at compile timecorrect

Which of the following allows us to call generic methods as a normal method? Type Interface Interface Inner class All of the mentioned

Type Interface

We can define bounded types in combination. Which of the following is a valid declaration? class Test<T extends Number implements Runnable> { } class Test<T extends Number super Runnable> { } class Test<T extends Number & Runnable> { } class Test<T extends Number | Runnable> { }

class Test<T extends Number & Runnable> { }

Which package provides many event classes and Listener interfaces for event handling? java.awt java.awt.Graphics java.awt.event None of the above

java.awt.event


Kaugnay na mga set ng pag-aaral

Systems Analysis and Design Tenth Edition Chapter 1

View Set

Grammar and vocabulary for cambridge advanced and proficiency Unit 3

View Set

General Data Protection Regulation

View Set

Anthem - Tools for Compliant Selling

View Set

Iggy Chapter 40: Concepts of Care for Patients With Problems of the Central Nervous System: The Spinal Cord

View Set