Quiz
Final
Crie uma conta grátis para terminar este quiz
Salve seu progresso e veja sua nota final.
Já tem uma conta? Inicie sessão
Perguntas do quiz (167)
1This is a collection of programming statements that specify the fields and methods that a particular type of object may have.
- Aclass
- Bmethod
- Cparameter
- DInstance
2A class is analogous to a(n) __________.
- AHouse
- BBlueprint
- CDrafting table
- DArchitect
3An object is a(n) __________.
- ABlueprint
- Bprimitive data type
- Cvariable
- Dinstance of a class
4This is a class member that holds data.
- Amethod
- Binstance
- Cfield
- Dconstructor
5This keyword causes an object to be created in memory.
- Acreate
- Bnew
- Cobject
- Dconstruct
6This is a method that gets a value from a class’s field, but does not change it.
- Aaccessor
- Bconstructor
- Cvoid
- Dmutator
7This is a method that stores a value in a field or in some other way changes the value of a field.
- Aaccessor
- Bconstructor
- Cvoid
- Dmutator
8When the value of an item is dependent on other data, and that item is not updated when the other data is changed, what has the value become?
- Abitter
- Bstale
- Casynchronous
- Dmoldy
9This is a method that is automatically called when an instance of a class is created.
- Aaccessor
- Bconstructor
- Cvoid
- Dmutator
10When a local variable has the same name as a field, the local variable’s name does this
to the field’s name.- Ashadows
- Bcomplements
- Cdeletes
- Dmerges with
11This is automatically provided for a class if you do not write one yourself.
- Aaccessor method
- Bdefault instance
- Cdefault constructor
- Dvariable declaration
12Two or more methods in a class may have the same name, as long as this is different.
- Atheir return values
- Btheir access specifier
- Ctheir parameter lists
- Dtheir memory address
13The process of matching a method call with the correct method is known as __________.
- Amatching
- Bbinding
- Clinking
- Dconnecting
1414. A class’s responsibilities are __________.
- Athe objects created from the class
- Bthings the class knows
- Cactions the class performs
- Dboth b and c
15The new operator creates an instance of a class.
- AVerdadeiro
- BFalso
16Each instance of a class has its own set of instance fields.
- AVerdadeiro
- BFalso
17When you write a constructor for a class, it still has the default Constructor that Java automatically provides.
- AVerdadeiro
- BFalso
18A class may not have more than one constructor.
- AVerdadeiro
- BFalso
19To find the classes needed for an object-oriented application, you identify all of the verbs in a description of the problem domain.
- AVerdadeiro
- BFalso
20In an array declaration, this indicates the number of elements that the array will have.
- Asubscript
- Bsize declarator
- Celement sum
- Dreference variable
21Each element of an array is accessed by a number known as a(n) __________.
- Asubscript
- Bsize declarator
- Caddress
- Dspecifier
22 The first subscript in an array is always ___________.
- A1
- B0
- C21
- D1 less than the number of elements
23The last subscript in an array is always __________.
- A100
- B0
- C21
- D1 less than the number of elements
24Array bounds checking happens __________.
- Awhen the program is compiled
- Bwhen the program is saved
- Cwhen the program runs
- Dwhen the program is loaded into memory
25This array field holds the number of elements that the array has.
- Asize
- Belements
- Clength
- Dwidth
26This search algorithm steps through an array, comparing each item with the search
value.- Aa. binary search
- Bb. sequential search
- Cc. selection search
- Dd. iterative search
27This search algorithm repeatedly divides the portion of an array being searched in
half.- Abinary search
- Bsequential search
- Cselection search
- Diterative search
28This is the typical number of comparisons performed by the sequential search on an array of N elements (assuming the search values are consistently found).
- A2N
- BN
- CN2
- DN/2
29When initializing a two-dimensional array, you enclose each row’s initialization list in ___________.
- Aa. braces
- Bb. parentheses
- Cc. brackets
- Dd. quotation marks
30To insert an item at a specific location in an ArrayList object, you use this method.
- Astore
- Binsert
- Cadd
- Dget
31To delete an item from an ArrayList object, you use this method.
- Aremove
- Bdelete
- Cerase
- Dget
32To determine the number of items stored in an ArrayList object, you use this method.
- Asize
- Bcapacity
- Citems
- Dlength
33Java does not allow a statement to use a subscript that is outside the range of valid subscripts for an array.
- AVerdadeiro
- BFalso
34An array’s size declarator can be a negative integer expression.
- AVerdadeiro
- BFalso
35Both of the following declarations are legal and equivalent:
int[] numbers;
int numbers[];- AVerdadeiro
- BFalso
36The subscript of the last element in a single-dimensional array is one less than the total number of elements in the array.
- AVerdadeiro
- BFalso
37The values in an initialization list are stored in the array in the order that they appear in the list.
- AVerdadeiro
- BFalso
38The Java compiler does not display an error message when it processes a statement that uses an invalid subscript.
- AVerdadeiro
- BFalso
39When an array is passed to a method, the method has access to the original array.
- AVerdadeiro
- BFalso
40The first size declarator in the declaration of a two-dimensional array represents the number of columns. The second size declarator represents the number of rows.
- AVerdadeiro
- BFalso
41A two-dimensional array has multiple length fields.
- AVerdadeiro
- BFalso
42An ArrayList automatically expands in size to accommodate the items stored in it.
- AVerdadeiro
- BFalso
43The isDigit, isLetter, and isLetterOrDigit methods are members of this class.
- AString
- BChar
- CCharacter
- DStringBuilder
44This method converts a character to uppercase.
- AmakeUpperCase
- BtoUpperCase
- CisUpperCase
- DupperCase
45The startsWith, endsWith, and regionMatches methods are members of this class.
- AString
- BChar
- CCharacter
- DWrapper
46The indexOf and lastIndexOf methods are members of this class.
- AString
- BInteger
- CCharacter
- DWrapper
47The substring, getChars, and toCharArray methods are members of this class.
- AString
- BFloat
- CCharacter
- DWrapper
48This String class method performs the same operation as the + operator when used
on strings.- Aadd
- Bjoin
- Cconcat
- Dplus
49The String class has several overloaded versions of a method that accepts a value of any primitive data type as its argument and returns a string representation of the value. The name of the method is ___________.
- AstringValue
- BvalueOf
- CgetString
- DvalToString
50If you do not pass an argument to the StringBuilder constructor, the object will have enough memory to store this many characters.
- A16
- B1
- C256
- DUnlimited
51This is one of the methods that are common to both the String and StringBuilder classes.
- Aappend
- Binsert
- Cdelete
- Dlength
52To change the value of a specific character in a StringBuilder object, use this method.
- AchangeCharAt
- BsetCharAt
- CsetChar
- Dchange
53To delete a specific character in a StringBuilder object, use this method.
- AdeleteCharAt
- BremoveCharAt
- CremoveChar
- Dexpunge
54The character that separates tokens in a string is known as a __________.
- Aseparator
- Btokenizer
- Cdelimiter
- DTerminator
55This String method breaks a string into tokens.
- Abreak
- Btokenize
- CgetTokens
- Dsplit
56These static final variables are members of the numeric wrapper classes and hold the minimum and maximum values for a particular data type.
- AMIN_VALUE and MAX_VALUE
- BMIN and MAX
- CMINIMUM and MAXIMUM
- DLOWEST and HIGHEST
57Character testing methods, such as isLetter, accept strings as arguments and test each character in the string.
- AVerdadeiro
- BFalso
58If the toUpperCase method’s argument is already uppercase, it is returned as is, with no changes.
- AVerdadeiro
- BFalso
59If toLowerCase method’s argument is already lowercase, it will be inadvertently converted to uppercase.
- AVerdadeiro
- BFalso
60The startsWith and endsWith methods are case-sensitive.
- AVerdadeiro
- BFalso
61There are two versions of the regionMatches method: one that is case sensitive and one that can be case-insensitive.
- AVerdadeiro
- BFalso
62The indexOf and lastIndexOf methods can find characters, but cannot find substrings.
- AVerdadeiro
- BFalso
63The String class’s replace method can replace individual characters, but cannot replace substrings.
- AVerdadeiro
- BFalso
64The StringBuilder class’s replace method can replace individual characters, but cannot replace substrings.
- AVerdadeiro
- BFalso
65You can use the = operator to assign a string to a StringBuilder object
- AVerdadeiro
- BFalso
66In an inheritance relationship, this is the general class.
- Asubclass
- Bsuperclass
- Cslave class
- Dchild class
67In an inheritance relationship, this is the specialized class.
- Asuperclass
- Bmaster class
- Csubclass
- Dparent class
68This keyword indicates that a class inherits from another class.
- Aderived
- Bspecialized
- Cbased
- Dextends
69A subclass does not have access to these superclass members.
- Apublic
- Bprivate
- Cprotected
- Dall of these
70This keyword refers to an object’s superclass.
- Asuper
- Bbase
- Csuperclass
- Dthis
71 In a subclass constructor, a call to the superclass constructor must __________.
- Aappear as the very first statement
- Bappear as the very last statement
- Cappear between the constructor’s header and the opening brace
- Dnot appear
72The following is an explicit call to the superclass’s default constructor.
- Aa. default();
- Bb. class();
- Cc. super();
- Dd. base();
73A method in a subclass that has the same signature as a method in the superclass is an
example of __________.- Aoverloading
- Boverriding
- Ccomposition
- Dan error
74A method in a subclass having the same name as a method in the superclass but a different
signature is an example of __________.- Aoverloading
- Boverriding
- Ccomposition
- Dan error
75These superclass members are accessible to subclasses and classes in the same package.
- Aprivate
- Bpublic
- Cprotected
- Dall of these
76All classes directly or indirectly inherit from this class.
- AObject
- BSuper
- CRoot
- DJava
77With this type of binding, the Java Virtual Machine determines at runtime which method to call, depending on the type of the object that a variable references
- Astatic
- Bearly
- Cflexible
- Ddynamic
78This operator can be used to determine whether a reference variable references an object of a particular class.
- Aisclass
- Btypeof
- Cinstanceof
- Disinstance
79When a class implements an interface, it must __________.
- Aoverload all of the methods listed in the interface
- Bprovide all of the nondefault methods that are listed in the interface, with the exact
signatures and return types specified - Cnot have a constructor
- Dbe an abstract class
80Fields in an interface are __________.
- Afinal
- Bstatic
- Cboth final and static
- Dnot allowed
81Abstract methods must be __________.
- Aoverridden
- Boverloaded
- Cdeleted and replaced with real methods
- Ddeclared as private
82Abstract classes cannot __________.
- Abe used as superclasses
- Bhave abstract methods
- Cbe instantiated
- Dhave fields
83You use the __________ operator to define an anonymous inner class.
- Aa. class
- Bb. inner
- Cc. new
- Dd. anonymous
84An anonymous inner class must __________.
- Abe a superclass
- Bimplement an interface
- Cextend a superclass
- Deither b or c.
85A functional interface is an interface with __________.
- Aonly one abstract method.
- Bno abstract methods.
- Conly private methods.
- Dno name.
86You can use a lambda expression to instantiate an object that __________.
- Athat has no constructor.
- Bextends any superclass.
- Cimplements a functional interface
- Ddoes not implement an interface.
87Constructors are not inherited.
- AVerdadeiro
- BFalso
88In a subclass, a call to the superclass constructor can only be written in the subclass constructor.
- AVerdadeiro
- BFalso
89If a subclass constructor does not explicitly call a superclass constructor, Java will not call any of the superclass’s constructors.
- AVerdadeiro
- BFalso
90An object of a superclass can access members declared in a subclass.
- AVerdadeiro
- BFalso
91The superclass constructor always executes before the subclass constructor.
- AVerdadeiro
- BFalso
92When a method is declared with the final modifier, it must be overridden in a subclass.
- AVerdadeiro
- BFalso
93A superclass has a member with package access. A class that is outside the superclass’s package but inherits from the superclass can access the member.
- AVerdadeiro
- BFalso
94A superclass reference variable can reference an object of a subclass that extends the superclass.
- AVerdadeiro
- BFalso
95 A subclass reference variable can reference an object of the superclass.
- AVerdadeiro
- BFalso
96When a class contains an abstract method, the class cannot be instantiated.
- AVerdadeiro
- BFalso
97A class may only implement one interface.
- AVerdadeiro
- BFalso
98By default all members of an interface are public.
- AVerdadeiro
- BFalso
99When an exception is generated, it is said to have been __________.
- Abuilt
- Bthrown
- Ccaught
- Dkilled
100This is a section of code that gracefully responds to exceptions.
- Aexception generator
- Bexception manipulator
- Cexception handler
- Dexception monitor
101If your code does not handle an exception when it is thrown, it is dealt with by this.
- Adefault exception handler
- Bthe operating system
- Csystem debugger
- Ddefault exception generator
102All exception classes inherit from this class.
- Aa. Error
- Bb. RuntimeException
- Cc. JavaException
- Dd. Throwable
103FileNotFoundException inherits from __________.
- Aa. Error
- Bb. IOException
- Cc. JavaException
- Dd. FileException
104You can think of this code as being “protected” because the application will not halt if it throws an exception.
- Atry block
- Bcatch block
- Cfinally block
- Dprotected block
105This method can be used to retrieve the error message from an exception object.
- Aa. errorMessage
- Bb. errorString
- Cc. getError
- Dd. getMessage
106The numeric wrapper classes’ “parse” methods all throw an exception of this type.
- AParseException
- BNumberFormatException
- CIOException
- DBadNumberException
107This is one or more statements that are always executed after the try block has executed and after any catch blocks have executed if an exception was thrown.
- Atry block
- Bcatch block
- Cfinally block
- Dprotected block
108This is an internal list of all the methods that are currently executing.
- Ainvocation list
- Bcall stack
- Ccall list
- Dlist trace
109This method may be called from any exception object, and it shows the chain of methods that were called when the exception was thrown.
- AprintInvocationList
- BprintCallStack
- CprintStackTrace
- DprintCallList
110These are exceptions that inherit from the Error class or the RuntimeException class.
- Aunrecoverable exceptions
- Bunchecked exceptions
- Crecoverable exceptions
- Dchecked exceptions
111All exceptions that do not inherit from the Error class or the RuntimeException
- Aunrecoverable exceptions
- Bunchecked exceptions
- Crecoverable exceptions
- Dchecked exceptions
112This informs the compiler of the exceptions that could get thrown from a method.
- Athrows clause
- Bparameter list
- Ccatch clause
- Dmethod return type
113You use this statement to throw an exception manually.
- Atry
- Bgenerate
- Cthrow
- DSystem.exit(0)
114This is the process of converting an object to a series of bytes that represent the object’s data.
- Aserialization
- Bdeserialization
- Cdynamic conversion
- Dcasting
115You are not required to catch exceptions that inherit from the RuntimeException class.
- AVerdadeiro
- BFalso
116When an exception is thrown by code inside a try block, all of the statements in the try block are always executed.
- AVerdadeiro
- BFalso
117 IOException serves as a superclass for exceptions that are related to programming errors, such as an out-of-bounds array subscript.
- AVerdadeiro
- BFalso
118You cannot have more than one catch clause per try statement.
- AVerdadeiro
- BFalso
119When an exception is thrown, the JVM searches the try statement’s catch clauses from top to bottom and passes control of the program to the first catch clause with a parameter that is compatible with the exception.
- AVerdadeiro
- BFalso
120Not including polymorphic references, a try statement may have only one catch clause for each specific type of exception.
- AVerdadeiro
- BFalso
121When in the same try statement you are handling multiple exceptions and some of the exceptions are related to each other through inheritance, you should handle the more general exception classes before the more specialized exception
classes.- AVerdadeiro
- BFalso
122The throws clause causes an exception to be thrown.
- AVerdadeiro
- BFalso
123With Swing, you use this class to create a frame.
- AFrame
- BSwingFrame
- CJFrame
- DJavaFrame
124This is the part of a JFrame object that holds the components that have been added to the JFrame object.
- Acontent pane
- Bviewing area
- Ccomponent array
- Dobject collection
125This is a JPanel object’s default layout manager.
- ABorderLayout
- BGridLayout
- CFlowLayout
- DNone
126This is the default layout manager for a JFrame object’s content pane.
- ABorderLayout
- BGridLayout
- CFlowLayout
- DNone
127If a container is governed by a BorderLayout manager and you add a component to it, but you do not pass the second argument specifying the region, this is the region in which the component will be added.
- Anorth
- Bsouth
- Ceast
- Dcenter
128Components in this/these regions of a BorderLayout manager are resized horizontally so they fill up the entire region.
- Anorth and south
- Beast and west
- Ccenter only
- Dnorth, south, east, and west
129Components in this/these regions of a BorderLayout manager are resized vertically so they fill up the entire region.
- Anorth and south
- Beast and west
- Ccenter only
- Dnorth, south, east, and west
130Components in this/these regions of a BorderLayout manager are resized both horizontally and vertically so they fill up the entire region.
- Anorth and south
- Beast and west
- Ccenter only
- Dnorth, south, east, and west
131This is the default alignment of a FlowLayout manager.
- Aleft
- Bcenter
- Cright
- Dno alignment
132Adding radio button components to this type of object creates a mutually exclusive relationship between them.
- AMutualExclude
- BRadioGroup
- CLogicalGroup
- DButtonGroup
133You use this class to create Border objects.
- ABorderFactory
- BBorderMaker
- CBorderCreator
- DBorderSource
134A panel cannot be displayed by itself.
- AVerdadeiro
- BFalso
135You can place multiple components inside a GridLayout cell.
- AVerdadeiro
- BFalso
136You can place multiple components inside a BorderLayout region.
- AVerdadeiro
- BFalso
137You can place multiple components inside a container governed by a FlowLayout manager.
- AVerdadeiro
- BFalso
138You can place a panel inside a region governed by a BorderLayout manager.
- AVerdadeiro
- BFalso
139A component placed in a GridLayout manager’s cell will not be resized to fill up any extra space in the cell.
- AVerdadeiro
- BFalso
140You normally add JCheckBox components to a ButtonGroup object.
- AVerdadeiro
- BFalso
141A mutually exclusive relationship is automatically created among all JRadioButton components in the same container.
- AVerdadeiro
- BFalso
142You can write a class that extends the JPanel class.
- AVerdadeiro
- BFalso
143A(n) ____________ is a method that automatically executes when a specific event occurs.
- Acontroller
- Bevent listener
- Cinitialize method
- Dautoresponder
144A ________________ is a tree-like hierarchical data structure that contains the components of a JavaFX GUI.
- Adirectory tree
- Bnode tree
- Cnode graph
- Dscene graph
145A _______________ is the parent of all the other nodes in a scene graph.
- Aroot node
- Bbranch node
- Cleaf node
- Dprimary node
146A _______________ can contain other nodes.
- Aroot node
- Bbranch node
- Cleaf node
- Dmother node
147A _______________ cannot have children.
- Aroot node
- Bbranch node
- Cleaf node
- Dterminal node
1486. _____________ is a markup language that describes a JavaFX scene graph.
- AFXML
- BJFXMarkUp
- CHTML
- DSceneXML
149The ____________ panel in Scene Builder provides a list of JavaFX components that
you can use in an application.- AContent
- BInspector
- CLibrary
- DHierarchy
150The ____________ panel in Scene Builder is where you visually design an application’s GUI.
- AContent
- BInspector
- CLibrary
- DHierarchy
151The ____________ panel in Scene Builder shows the scene graph.
- AContent
- BInspector
- CLibrary
- DHierarchy
152The ____________ panel in Scene Builder allows you to work with a component’s properties, layout, and code.
- AContent
- BInspector
- CLibrary
- DHierarchy
153A(n) ________________ is a name that identifies a component in the FXML file.
- Afx:name
- Bfx:id
- Cfx:component
- DFx:variable
154In a JavaFX application, the _________ class loads the FXML file and builds the scene graph.
- Amain application
- Bcontroller
- Cevent listener
- DLoader
155In a JavaFX application, the _________ class is responsible for handling events that occur while the application is running.
- Amain application
- Bcontroller
- Cevent listener
- DLoader
156A _________________ is a component that can be either selected or deselected. These components usually appear in a group so that only one of them in the group can be selected at a time.
- AButton
- BCheckBox
- CRadioButton
- DRadioBox
157You call the ___________ method to determine whether a RadioButton is selected.
- AisRadioSelected
- BisOn
- CisSelected
- DisClicked
158You call the ___________ method to determine whether a CheckBox is selected.
- AisCheckBoxSelected
- BisOn
- CisSelected
- DisClicked
159You can use the ______________ component to display images in an application’s
GUI.- AImageView
- BImage
- CPictureBox
- DGraphicBox
160 You call the ________ method to change an ImageView component’s image.
- Aimage
- BchangeImage
- CshowImage
- DsetImage
161 A mutually exclusive relationship is automatically created between all RadioButton components that are in the same toggle group.
- AVerdadeiro
- BFalso
162 A component’s fx:id can become a variable name that you can use in an application’s controller class.
- AVerdadeiro
- BFalso
163The controller class usually loads the FXML file and builds the scene graph.
- AVerdadeiro
- BFalso
164 You can use Scene Builder to register a controller class to a GUI.
- AVerdadeiro
- BFalso
165Registering a controller class to a GUI automatically registers event listeners to all of the GUI’s components.
- AVerdadeiro
- BFalso
166You can register an event listener to a RadioButton. The event listener will execute when the user clicks the RadioButton.
- AVerdadeiro
- BFalso
167You cannot register an event listener to a CheckBox.
- AVerdadeiro
- BFalso
Informações
- Descrição
- Programming Quiz sobre Final, criado por Rosie V. em 10-12-2016.
- Autor
- Rosie V.
- Idioma
- English
- Visualizações
- 2
- Etiquetas
- Avaliação
- Ainda sem avaliações Avalie este quiz