<< < 120 121 122 123 124 125 126 127 128 129 130 > >>   Sort: Date

How to create a thread in a program?
How to create a thread in a program? You have two ways to do so. First, making your class "extends" Thread class. Second, making your class "implements" Runnable interface. Put jobs in a run() method and call start() method to start the thread.
2012-06-11, 2666👍, 0💬

Can we use System.arraycopy() method to copy the same array?
Can we use System.arraycopy() method to copy the same array? Yes, you can. The source and destination arrays can be the same if you want to copy a subset of the array to another area within that array.
2012-09-04, 2663👍, 0💬

Name the containers which uses Border Layout as their default layout?
Name the containers which uses Border Layout as their default layout? Containers which uses Border Layout as their default are: window, Frame and Dialog classes.
2012-05-21, 2661👍, 0💬

How could Java classes direct program messages to the system console, but error messages, say to a file?
How could Java classes direct program messages to the system console, but error messages, say to a file? The class System has a variable out that represents the standard output, and the variable err that represents the standard error device. By default, they both point at the system console. This ho...
2012-05-18, 2658👍, 0💬

What happens to objects lost in "unreachable" memory..... ?
What happens to objects lost in "unreachable" memory..... ? What happens to objects lost in "unreachable" memory, such as the object returned by Ob-&gt;new() in `{ my $ap; $ap = [ Ob-&gt;new(), \$ap ]; }' ? Their destructors are called when that interpreter thread shuts down. When the interp...
2013-09-20, 2657👍, 0💬

I see code like ...
I see code like char *p = malloc(strlen(s) + 1); strcpy(p, s); Shouldn't that be malloc((strlen(s) + 1) * sizeof(char))? It's never necessary to multiply by sizeof(char), since sizeof(char) is, by definition, exactly 1. (On the other hand, multiplying by sizeof(char) doesn't hurt, and in some circum...
2016-06-21, 2656👍, 0💬

What would you use to compare two String variables - the operator == or the method equals()?
What would you use to compare two String variables - the operator == or the method equals()? I'd use the method equals() to compare the values of the Strings and the == to check if two variables point at the same instance of a String object.
2012-06-07, 2656👍, 0💬

What is a transient variable?
What is a transient variable? A transient variable is a variable that may not be serialized.
2012-09-13, 2655👍, 0💬

What is an IO filter?
What is an IO filter? An IO filter is an object that reads from one stream and writes to another, usually altering the data in some way as it is passed from one stream to another.
2012-08-02, 2655👍, 0💬

What is the difference between preemptive scheduling and time slicing?
What is the difference between preemptive scheduling and time slicing? Under preemptive scheduling, the highest priority task executes until it enters the waiting or dead states or a higher priority task comes into existence. Under time slicing, a task executes for a predefined slice of time and the...
2012-06-26, 2655👍, 0💬

What invokes a thread's run() method?
What invokes a thread's run() method? After a thread is started, via its start() method of the Thread class, the JVM invokes the thread's run() method when the thread is initially executed.
2012-06-14, 2655👍, 0💬

What is the difference between a Choice and a List?
What is the difference between a Choice and a List? A Choice is displayed in a compact form that requires you to pull it down to see the list of available choices. Only one item may be selected from a Choice. A List may be displayed in such a way that several List items are visible. A List supports ...
2012-12-24, 2654👍, 0💬

Which class should you use to obtain design information about an object?
Which class should you use to obtain design information about an object? The Class class is used to obtain information about an object's design.
2012-07-23, 2653👍, 0💬

A set of tables are maintained in a Dataset as ...
A set of tables are maintained in a Dataset as ... A set of tables are maintained in a Dataset as * TablesCollection object * DataTableCollection object * DataRowsCollection object * TableRowCollection object TablesCollection object
2014-07-11, 2652👍, 0💬

What is design by contract?
What is design by contract? The design by contract specifies the obligations of a method to any other methods that may use its services and also theirs to it. For example, the preconditions specify what the method required to be true when the method is called. Hence making sure that preconditions ar...
2012-08-15, 2646👍, 0💬

What is the Map interface?
What is the Map interface? The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys with values.
2012-07-20, 2645👍, 0💬

Assume that $ref refers to a scalar, an array, a hash or to some nested data structure. Explain the following statements:
Assume that $ref refers to a scalar, an array, a hash or to some nested data structure. Explain the following statements: $$ref; # returns a scalar $$ref[0]; # returns the first element of that array $ref- &gt; [0]; # returns the first element of that array @$ref; # returns the contents of that ...
2013-09-23, 2643👍, 0💬

How is JSP include directive different from JSP include action.
How is JSP include directive different from JSP include action. When a JSP include directive is used, the included file's code is added into the added JSP page at page translation time, this happens before the JSP page is translated into a servlet. While if any page is included using action tag, the...
2013-08-13, 2643👍, 0💬

What is the Vector class?
What is the Vector class? The Vector class provides the capability to implement a growable array of objects
2012-06-20, 2642👍, 0💬

What is an Iterator interface?
What is an Iterator interface? The Iterator interface is used to step through the elements of a Collection.
2012-06-21, 2641👍, 0💬

How do you match one letter in the current locale?
How do you match one letter in the current locale? /[^\W_\d]/ We don't have full POSIX regexps, so you can't get at the isalpha() &lt;ctype.h&gt; macro save indirectly. You ask for one byte which is neither a non-alphanumunder, nor an under, nor a numeric. That leaves just the alphas, which ...
2013-09-23, 2639👍, 0💬

What is a static method?
What is a static method? A static method is a method that belongs to the class rather than any object of the class and doesn't apply to an object or even require that any objects of the class have been instantiated.
2012-07-11, 2639👍, 0💬

What is the Properties class?
What is the Properties class? The properties class is a subclass of Hashtable that can be read from or written to a stream. It also provides the capability to specify a set of default values to be used.
2012-07-05, 2639👍, 0💬

Name Component subclasses that support painting?
Name Component subclasses that support painting? The Canvas, Frame, Panel, and Applet classes support painting.
2012-06-26, 2639👍, 0💬

<< < 120 121 122 123 124 125 126 127 128 129 130 > >>   Sort: Date