Scenario
a. Scrollable is an interface.
b. Writable is an interface.
c. TextScreen is an abstract class.
d. VideoScreen is a class that extends TextScreen and implements both Scrollable...
Type: Posts; User: jmsrajeev
Scenario
a. Scrollable is an interface.
b. Writable is an interface.
c. TextScreen is an abstract class.
d. VideoScreen is a class that extends TextScreen and implements both Scrollable...
a. final
b. abstract
c. virtual
d. static
Which of the keywords above are often used with polymorphic methods?
What java.util class method is used to sort an array of beans, where the method can specify the order of sorting?
Choice 1 Collections.sort(beans);
Choice 2 Algorithms.quickSort(beans);...
Which one of the following is an advantage of providing accessor methods in a class, rather than making the class's fields publicly accessible?
Choice 1 Accessor methods can ensure data...
Which statement about JavaBeans is NOT true?
Choice 1 A JavaBean is a re-usable software component.
Choice 2 A JavaBean is immutable; it cannot contain variable data.
Choice 3 A...
Which one of the following is a checked exception?
Choice 1 Error
Choice 2 NullPointerException
Choice 3 ArithmeticException
Choice 4 RuntimeException
Invoking a method can represent a significant amount of overhead in a program; as such, some compilers will perform an optimization called "method inlining." This optimization will remove a method...
a. Class loading
b. Class verification
c. Garbage collection
d. Code execution
e. Source code generation
How do you store a copy of an object at the same time other threads are changing the object's properties?
Choice 1 You do not need to do anything special since all ObjectOutputStream methods...
Which one of the following is an advantage of providing accessor methods in a class, rather than making the class's fields publicly accessible?
Choice 1 Accessor methods can ensure data...
I think the answer should be 4 i.e. choice 1, since its taking 4 command parameter. Any suggestions?
[redacted]
I found some good questins from BrainBench. It would be great if you could discuss and answer solutions of these questions.
Sample Code
synchronized void move() throws...