<< < 127 128 129 130 131 132 133 134 135 136 137 > >>   Sort: Date

What is the relationship between an event-listener interface and an event-adapter class?
What is the relationship between an event-listener interface and an event-adapter class? An event-listener interface defines the methods that must be implemented by an event handler for a particular kind of event. An event adapter provides a default implementation of an event-listener interface.
2012-12-03, 2475👍, 0💬

What is polymorphism?
What is polymorphism? Polymorphism means "having many forms". It allows methods (may be variables) to be written that needn't be concerned about the specifics of the objects they will be applied to. That is, the method can be specified at a higher level of abstraction and can be counted on to work e...
2012-08-14, 2474👍, 0💬

There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java techniqu
There are two classes: A and B. The class B need to inform a class A when some important event has happened. What Java technique would you use to implement it? If these classes are threads I'd consider notify() or notifyAll(). For regular classes you can use the Observer interface.
2013-04-19, 2471👍, 0💬

What are the XML files that are important in developing an ASP.NET application?
What are the XML files that are important in developing an ASP.NET application? The XML file necessary for the for developing an asp.net application is Web.config
2014-09-22, 2468👍, 0💬

How do you create a read-only collection?
How do you create a read-only collection? The Collections class has six methods to help out here: 1. unmodifiableCollection(Collect ionc) 2. unmodifiableList(List list) 3. unmodifiableMap(Map m) 4. unmodifiableSet(Set s) 5. unmodifiableSortedMap(SortedMa pm) 6. unmodifiableSortedSet(SortedSe ts) If ...
2012-08-30, 2468👍, 0💬

In which case would you choose a static inner class?
In which case would you choose a static inner class? Interesting one, static inner classes can access the outer class's protected and private fields. This is both a positive and a negitive point for us since we can, in essence, violate the encapsulation of the outer class by mucking up the outer cla...
2012-09-07, 2465👍, 0💬

Explain the usage of Java packages.
Explain the usage of Java packages. This is a way to organize files when a project consists of multiple modules. It also helps resolve naming conflicts when different packages have classes with the same names. Packages access level also allows you to protect data from being used by the non-authorize...
2012-08-09, 2465👍, 0💬

How do you generate an RCW from a COM object?
How do you generate an RCW from a COM object? Use the Type Library Import utility shipped with SDK. tlbimp COMobject.dll /out:.NETobject.dll or reference the COM library from Visual Studio in your project.
2014-12-04, 2464👍, 0💬

Is sizeof a keyword?
Is sizeof a keyword? The sizeof operator is not a keyword.
2012-10-01, 2464👍, 0💬

This class (IncrementImpl) will be used by various threads concurrently; can you see the inherent flaw(s)? How would you improve
This class (IncrementImpl) will be used by various threads concurrently; can you see the inherent flaw(s)? How would you improve it? public class IncrementImpl { private static int counter = 0; public synchronized void increment() { counter++; } public int getCounter() { return counter; } } The coun...
2012-08-28, 2462👍, 0💬

How to add menushortcut to menu item?
How to add menushortcut to menu item? If you have a button instance called aboutButton, you may add menu short cut by calling aboutButton.setMnemonic('A'), so the user may be able to use Alt+A to click the button.
2012-08-17, 2462👍, 0💬

Does the code in finally block get executed if there is an exception and a return statement in a catch block?
Does the code in finally block get executed if there is an exception and a return statement in a catch block? If an exception occurs and there is a return statement in catch block, the finally block is still executed. The finally block will not be executed when the System.exit(1) statement is execut...
2012-08-10, 2462👍, 0💬

What information is needed to create a TCP Socket?
What information is needed to create a TCP Socket? The Local Systems IP Address and Port Number. And the Remote System’s IPAddress and Port Number.
2013-07-12, 2461👍, 0💬

What is a JSP and what is it used for?
What is a JSP and what is it used for? Java Server Pages (JSP) is a platform independent presentation layer technology that comes with SUN s J2EE platform. JSPs are normal HTML pages with Java code pieces embedded in them. JSP pages are saved to *.jsp files. A JSP compiler is used in the background ...
2013-07-04, 2457👍, 0💬

What is an abstract method?
What is an abstract method? An abstract method is a method whose implementation is deferred to a subclass.
2012-11-01, 2457👍, 0💬

If my class already extends from some other class what should I do if I want an instance of my class to be thrown as an exceptio
If my class already extends from some other class what should I do if I want an instance of my class to be thrown as an exception object? One can not do anytihng in this scenarion. Because Java does not allow multiple inheritance and does not provide any exception interface as well.
2013-05-30, 2456👍, 0💬

Is there any other way that you can achieve inheritance in Java?
Is there any other way that you can achieve inheritance in Java? There are a couple of ways. As you know, the straight way is to "extends" and/or "implements". The other way is to get an instance of the class to achieve the inheritance. That means to make the supposed-super-class be a field member. ...
2012-08-29, 2456👍, 0💬

Why does JComponent have add() and remove() methods but Component does not?
Why does JComponent have add() and remove() methods but Component does not? because JComponent is a subclass of Container, and can contain other components and jcomponents. How can I implement a thread-safe JSP page? - You can make your JSPs thread-safe by having them implement the SingleThreadModel...
2013-07-20, 2455👍, 0💬

What is a task's priority and how is it used in scheduling?
What is a task's priority and how is it used in scheduling? A task's priority is an integer value that identifies the relative order in which it should be executed with respect to other tasks. The scheduler attempts to schedule higher priority tasks before lower priority tasks.
2012-10-12, 2453👍, 0💬

Describe the advantages of writing a managed code application instead of unmanaged one. What’s involved in certain piece of co
Describe the advantages of writing a managed code application instead of unmanaged one. What’s involved in certain piece of code being managed? The advantages include automatic garbage collection, memory management, support for versioning and security. These advantages are provided through .NET F...
2014-11-19, 2451👍, 0💬

What is the Collections API?
What is the Collections API? The Collections API is a set of classes and interfaces that support operations on collections of objects.
2012-09-21, 2449👍, 0💬

Can you write a Java class that could be used both as an applet as well as an application?
Can you write a Java class that could be used both as an applet as well as an application? A. Yes. Add a main() method to the applet.
2012-08-20, 2446👍, 0💬

What is the difference between a static and a non-static inner class?
What is the difference between a static and a non-static inner class? A non-static inner class may have object instances that are associated with instances of the class's outer class. A static inner class does not have any object instances.
2012-11-06, 2445👍, 0💬

Where’s global assembly cache located on the system?
Where’s global assembly cache located on the system? Usually C:\winnt\assembly or C:\windows\assembly.
2014-12-22, 2444👍, 0💬

<< < 127 128 129 130 131 132 133 134 135 136 137 > >>   Sort: Date