programming languages Online Quiz - 194
Description: programming languages Online Quiz - 194 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
finalize method is used to release system resources.
A local variable in a block may be re-declared in another local block, if the blocks are disjoint.
All loops are controlled by a boolean expression.
Which type of Statements can execute parameterized queries?
A method can not have the same name as another method in the same class.
Constructors can have a return type.
Any class that implements the Runnable interface has to provide the implementation for the following methods public void start(); public void run();
A thread that has called the wait() method of an object still owns the lock of the object.
A number of threads of the same priority have relinquished the lock on a monitor and are in a waiting state after having called the wait() method of the object. A new thread enters the monitor and calls the notifyAll() method of the meonitor. Which of these threads will be the first one to resume?
class Line { Line 1. public class Point { public int x,y; } Line 2. public Point getPoint() { return new Point(); } Line 3. } Line 4. class Triangle { Line 5. public Triangle() { Line 6. // insert code here Line 7. } 18. } Which code, inserted at line Line 6, correctly retrieves a local instance of a Point object? A. Point p = Line.getPoint(); B. Line.Point p = Line.getPoint(); C. Point p = (new Line()).getPoint(); D. Line.Point p = (new Line()).getPoint();
Given a method that must ensue that its parameter is not null: Line 1. public void someMethod(Object value) { Line 2. // check for null value Line 3. System.out.println(value.getClass()); Line 4. } What, inserted at line 2, is the appropriate way to handle a null value? A. assert value == null; B. assert value !null, “value is null”; C. if (value == null) { throw new AssertionException(”value is null”); D. if (value == null) { throw new IllegalArgumentException(”value is null”);
Which declare a compilable abstract class? (Choose all that apply.)
Which is true? (Choose all that apply. )
Which method names follow the JavaBeans standard? (Choose all that apply.)