<< < 116 117 118 119 120 121 122 123 124 125 126 > >>   Sort: Date

What are the advantages of inheritance?
What are the advantages of inheritance? It permits code reusability. Reusability saves time in program development. It encourages the reuse of proven and debugged high-quality software, thus reducing problem after a system becomes functional.
2012-01-26, 2743👍, 0💬

What can go wrong if you replace &emp;&emp; with &emp; in the following code: String a=null; if (a!=null && a.length()&gt;10) {
What can go wrong if you replace &emp;&emp; with &emp; in the following code: String a=null; if (a!=null && a.length()&gt;10) {...} A single ampersand here would lead to a NullPointerException.
2012-06-19, 2740👍, 0💬

Jack developed a program by using a Map container to hold key/value pairs. He wanted to make a change to the map. He decided to
Jack developed a program by using a Map container to hold key/value pairs. He wanted to make a change to the map. He decided to make a clone of the map in order to save the original data on side. What do you think of it? ? If Jack made a clone of the map, any changes to the clone or the original map...
2012-05-16, 2740👍, 0💬

What is a container class? C++ What are the types of container classes?
What is a container class? C++ What are the types of container classes? A container class is a class that is used to hold objects in memory or external storage. A container class acts as a generic holder. A container class has a predefined behavior and a well-known interface. A container class is a ...
2012-01-16, 2740👍, 0💬

How do I do fill_in_the_blank for each file in a directory?
How do I do fill_in_the_blank for each file in a directory? Here's code that just prints a listing of every file in the current directory: #!/usr/bin/perl -w opendir(DIR, "."); @files = readdir(DIR); closedir(DIR); foreach $file (@files) { print "$file\n"; }
2013-08-23, 2739👍, 0💬

How does JSP handle runtime exceptions?
How does JSP handle runtime exceptions? Using errorPage attribute of page directive and also we need to specify isErrorPage=true if the current page is intended to URL redirecting of a JSP.
2013-08-20, 2739👍, 0💬

What are the different scopes for Java variables?
What are the different scopes for Java variables? The scope of a Java variable is determined by the context in which the variable is declared. Thus a java variable can have one of the three scopes at any given point in time. 1. Instance : - These are typical object level variables, they are initiali...
2013-06-28, 2735👍, 0💬

Why do threads block on I/O?
Why do threads block on I/O? Threads block on I/O (that is enters the waiting state) so that other threads may execute while the I/O Operation is performed.
2012-09-14, 2732👍, 0💬

What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?
What is the word you will use when defining a function in base class to allow this function to be a polimorphic function? virtual
2012-02-16, 2731👍, 0💬

How do I generate a list of all .html files in a directory?
How do I generate a list of all .html files in a directory? Here's a snippet of code that just prints a listing of every file in the current directory that ends with the extension .html: #!/usr/bin/perl -w opendir(DIR, "."); @files = grep(/\.html$/,readdir(DIR)); closedir(DIR); foreach $file (@files...
2013-08-23, 2729👍, 0💬

How does multi-threading take place on a computer with a single CPU?
How does multi-threading take place on a computer with a single CPU? The operating system's task scheduler allocates execution time to multiple tasks. By quickly switching between executing tasks, it creates the impression that tasks execute sequentially.
2012-06-08, 2728👍, 0💬

How do you find out if a linked-list has an end? (i.e. the list is not a cycle)
How do you find out if a linked-list has an end? (i.e. the list is not a cycle) You can find out by using 2 pointers. One of them goes 2 nodes each time. The second one goes at 1 nodes each time. If there is a cycle, the one that goes 2 nodes each time will eventually meet the one that goes slower. ...
2012-01-24, 2725👍, 0💬

Why would you use a synchronized block vs. synchronized method?
Why would you use a synchronized block vs. synchronized method? Synchronized blocks place locks for shorter periods than synchronized methods.
2012-07-27, 2722👍, 0💬

How to read file into hash array ?
How to read file into hash array ? open(IN, "&lt;name_file") or die "Couldn't open file for processing: $!"; while (&lt;IN&gt;) { chomp; $hash_table{$_} = 0; } close IN; print "$_ = $hash_table{$_}\n" foreach keys %hash_table;
2013-09-10, 2720👍, 0💬

What is the difference between a Java application and a Java applet?
What is the difference between a Java application and a Java applet? The difference between a Java application and a Java applet is that a Java application is a program that can be executed using the Java interpeter, and a JAVA applet can be transfered to different networks and executed by using a w...
2012-04-12, 2719👍, 0💬

What is the difference between the File and RandomAccessFile classes?
What is the difference between the File and RandomAccessFile classes? The File class encapsulates the files and directories of the local file system. The RandomAccessFile class provides the methods needed to directly access data contained in any part of a file.
2013-01-08, 2717👍, 0💬

What are the different identifier states of a Thread?
What are the different identifier states of a Thread? The different identifiers of a Thread are: R - Running or runnable thread S - Suspended thread CW - Thread waiting on a condition variable MW - Thread waiting on a monitor lock MS - Thread suspended waiting on a monitor lock
2013-02-07, 2712👍, 0💬

If a class is declared without any access modifiers, where may the class be accessed?
If a class is declared without any access modifiers, where may the class be accessed? A class that is declared without any access modifiers is said to have package or friendly access. This means that the class can only be accessed by other classes and interfaces that are defined within the same pack...
2012-07-19, 2711👍, 0💬

What is similarities/difference between an Abstract class and Interface?
What is similarities/difference between an Abstract class and Interface? Differences are as follows: Interfaces provide a form of multiple inheritance. A class can extend only one other class. Interfaces are limited to public methods and constants with no implementation. Abstract classes can have a ...
2012-05-23, 2711👍, 0💬

How do you write a function that can reverse a linked-list?
How do you write a function that can reverse a linked-list? void reverselist(void) { if(head==0) return; if(head-&gt;next==0) return; if(head-&gt;next==tail) { head-&gt;next = 0; tail-&gt;next = head; } else { node* pre = head; node* cur = head-&gt;next; node* curnext = cur-&...
2012-01-26, 2705👍, 0💬

The Equivalent Html Control for the &lt;input type=”checkbox”> tag is
The Equivalent Html Control for the &lt;input type=”checkbox”> tag is The Equivalent Html Control for the &lt;input type=”checkbox”> tag is * HtmlCheckBox * HtmlInputChkBox * HtmlInputCheckBox * HtmlInputTypeChkBox HtmlInputCheckBox
2014-06-23, 2698👍, 0💬

Is String a primitive data type in Java?
Is String a primitive data type in Java? No String is not a primitive data type in Java, even though it is one of the most extensively used object. Strings in Java are instances of String class defined in java.lang package.
2013-06-25, 2698👍, 0💬

What is the purpose of the File class?
What is the purpose of the File class? The File class is used to create objects that provide access to the files and directories of a local file system.
2012-07-27, 2697👍, 0💬

What’s the difference between private and shared assembly?
What’s the difference between private and shared assembly? Private assembly is used inside an application only and does not have to be identified by a strong name. Shared assembly can be used by multiple applications and has to have a strong name.
2014-12-17, 2694👍, 0💬

<< < 116 117 118 119 120 121 122 123 124 125 126 > >>   Sort: Date