<< < 118 119 120 121 122 123 124 125 126 127 128 > >>   Sort: Date

Can you declare a class as private?
Can you declare a class as private? Yes, we can declare a private class as an inner class. For example, class MyPrivate { private static class MyKey { String key = "12345"; } public static void main(String[] args) { System.out.println(new MyKey().key);//prints 12345 } }
2012-08-23, 2724👍, 0💬

When a thread blocks on I/O, what state does it enter?
When a thread blocks on I/O, what state does it enter? A thread enters the waiting state when it blocks on I/O.
2012-10-10, 2723👍, 0💬

What is Serialization and deserialization?
What is Serialization and deserialization? Serialization is the process of writing the state of an object to a byte stream. Deserialization is the process of restoring these objects.
2012-08-09, 2722👍, 0💬

How do I print the entire contents of an array with Perl?
How do I print the entire contents of an array with Perl? To answer this question, we first need a sample array. Let's assume that you have an array that contains the name of baseball teams, like this: @teams = ('cubs', 'reds', 'yankees', 'dodgers'); If you just want to print the array with the arra...
2013-09-24, 2719👍, 0💬

Is Iterator a Class or Interface? What is its use?
Is Iterator a Class or Interface? What is its use? Iterator is an interface which is used to step through the elements of a Collection.
2012-05-23, 2719👍, 0💬

How do I perform browser redirection from a JSP page?
How do I perform browser redirection from a JSP page? You can use the response implicit object to redirect the browser to a different resource, as: response.sendRedirect("http:// www.exforsys.com/path/error.ht ml");You can also physically alter the Location HTTP header attribute, as shown below: You ...
2013-07-24, 2715👍, 0💬

How to concatenate strings with Perl?
How to concatenate strings with Perl? Method #1 - using Perl's dot operator: $name = 'checkbook'; $filename = "/tmp/" . $name . ".tmp"; Method #2 - using Perl's join function $name = "checkbook"; $filename = join "", "/tmp/", $name, ".tmp"; Method #3 - usual way of concatenating strings $filename = ...
2013-09-19, 2713👍, 0💬

Calculating Most Frequent Number
Can you write a computer code for the following problem: Given an online stream of infinite numbers, print out the most frequent number. Here is a solution in Java: import java.io.*; import java.util.*; public class MostFrequent { public static void main(String[] a) { int mapMax = 99; // Most freque...
2013-12-19, 2711👍, 0💬

What is casting?
What is casting? There are two types of casting, casting between primitive numeric types and casting between object references. Casting between numeric types is used to convert larger values, such as double values, to smaller values, such as byte values. Casting between object references is used to ...
2012-07-30, 2711👍, 0💬

What is the highest-level event class of the event-delegation model?
What is the highest-level event class of the event-delegation model? The java.util.EventObject class is the highest-level class in the event-delegation class hierarchy.
2012-12-05, 2706👍, 0💬

Describe run-time type identification.
Describe run-time type identification. The ability to determine at run time the type of an object by using the typeid operator or the dynamic_cast operator.
2012-03-22, 2705👍, 0💬

How can you add properties to an object?
How can you add properties to an object?
2013-10-23, 2701👍, 0💬

How do you know if an explicit object casting is needed?
How do you know if an explicit object casting is needed? If you assign a superclass object to a variable of a subclass's data type, you need to do explicit casting. For example: Object a; Customer b; b = (Customer) a; When you assign a subclass to a variable having a supeclass type, the casting is p...
2012-08-07, 2701👍, 0💬

What is the difference between a Window and a Frame?
What is the difference between a Window and a Frame? Heavy weight components like Abstract Window Toolkit (AWT), depend on the local windowing toolkit. For example, java.awt.Button is a heavy weight component, when it is running on the Java platform for Unix platform, it maps to a real Motif button....
2012-07-16, 2695👍, 0💬

The parameter “clienttarget = downlevel” does one of the following ...
The parameter “clienttarget = downlevel” does one of the following ... The parameter “clienttarget = downlevel” does one of the following * Adds aliases for specific user agents to an internal collection of user agent aliases * Indicates the useragents level of validating the controls *...
2014-07-07, 2694👍, 0💬

Software testing vs. debugging
The difference between testing and debugging is...
2020-10-17, 2688👍, 1💬

💬 2020-10-17 FYIcenter: Good question! Software testing is a task for a software QA engineer, who runs a large set of use cases on the software to ensur...

What is the difference between Process and Thread?
What is the difference between Process and Thread? A process can contain multiple threads. In most multithreading operating systems, a process gets its own memory address space; a thread doesn't. Threads typically share the heap belonging to their parent process. For instance, a JVM runs in a single...
2012-06-18, 2687👍, 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-18, 2687👍, 0💬

Can each Java object keep track of all the threads that want to exclusively access to it?
Can each Java object keep track of all the threads that want to exclusively access to it? Yes. Use Thread.currentThread() method to track the accessing thread.
2012-06-13, 2684👍, 0💬

What is the difference between the Font and FontMetrics classes?
What is the difference between the Font and FontMetrics classes? The FontMetrics class is used to define implementation-specific properties, such as ascent and descent, of a Font object
2012-07-17, 2683👍, 0💬

What tool is used to manage the GAC?
What tool is used to manage the GAC? What tool is used to manage the GAC? * GacMgr.exe * GacSvr32.exe * GacUtil.exe * RegSvr.exe GacUtil.exe
2014-03-11, 2681👍, 0💬

How do you delete a Cookie within a JSP?
How do you delete a Cookie within a JSP? Cookie mycook = new Cookie("name","value"); response.addCookie(mycook); Cookie killmycook = new Cookie("mycook","value"); killmycook.setMaxAge(0); killmycook.setPath("/"); killmycook.addCookie(killmycoo k);
2013-08-10, 2681👍, 0💬

Name two subclasses of the TextComponent class.
Name two subclasses of the TextComponent class. TextField and TextArea
2012-10-29, 2680👍, 0💬

What is the Set interface?
What is the Set interface? The Set interface provides methods for accessing the elements of a finite mathematical set. Sets do not allow duplicate elements.
2012-08-02, 2677👍, 0💬

<< < 118 119 120 121 122 123 124 125 126 127 128 > >>   Sort: Date