QueryCAT Logo
Search 5,000,000+ questions and answers.

Frequently Asked Questions

What must a class do to implement an interface?

JAVA interview questions
It must provide all of the methods in the interface and identify the interface in its implements clause.

Should I implement Finalize on my class? Should I implement IDisposable?

Andy Mc's .NET Framework FAQ
This issue is a little more complex than it first appears. There are really two categories of class that require deterministic destruction - the first category manipulate unmanaged types directly, whereas the second category manipulate managed types that require deterministic destruction. An example of the first category is a class with an IntPtr member representing an OS file handle. An example of the second category is a class with a System.IO.FileStream member. See similar questions...

Can a class implement different instantiations of the same generic interface?

Java Generics FAQs - Programming With Java Generics
No, a type must not directly or indirectly derive from two different instantiations of the same generic interface. The reason for this restriction is the translation by type erasure. After type erasure the different instantiations of the same generic interface collapse to the same raw type. At runtime there is no distinction between the different instantiations any longer. See similar questions...

How do I implement a Folder Browser class?

Forms - Windows Forms FAQs
Below is a technique that uses FolderNameEditor and FolderBrowser classes to implement a solution. You can also use iterop to get a solution. Both the FolderNameEditor and FolderBrowser classes used in this solution are described in the Docs as "This... See similar questions...

What's the IDropTarget interface for? Why would a control implement it?

Behavior - Windows Forms FAQs
IDropTarget is a new interface that factors out the four drag drop methods - OnDragEnter, OnDragLeave, OnDragDrop, and OnDragOver - into an interface so that it can be implemented elsewhere. It is mostly an implementation detail. See similar questions...

Is a C# interface the same as a C++ abstract class?

Andy Mc's C# FAQ for C++ programmers
No, not quite. An abstract class in C++ cannot be instantiated, but it can (and often does) contain implementation code and/or data members. A C# interface cannot contain any implementation code or data members - it is simply a group of method names & signatures. A C# interface is more like a COM interface than a C++ abstract class. See similar questions...

What is the difference between abstract class and interface?

Java FAQ - Page 7
Latest Answer: hi, Diff b/w abstract class and interface are.. Abstract class can have concrete me... Latest Answer: See the base class(super class) of all classes is Object class.Other wise when u creat a class ,and ... See similar questions...

Why is ActionForm a base class rather than an interface?

Apache Struts Web Application Framework
The MVC design pattern is very simple to understand but much more difficult to live with. You just need this little bit of Business Logic in the View logic or you need just that little bit of View logic in the Business tier and pretty soon you have a real mess. Making ActionForm a class takes advantage of the single inheritance restriction of Java to it makes it more difficult for people to do things that they should not do. See similar questions...

What are the differences between an interface and an abstract class?

Java Programmer's FAQ
The principal difference is that an abstract class is used when you have a type/subtype relationship. An interface does not imply a type/subtype hierarchy; it merely forces a class to have some methods with a given signature. That allows some other code to rely on being able to call those methods. You want to subclass abstract classes when you are making subtypes that define the abstract behavior. The subclass should have a "kind of" relationship to the superclass. See similar questions...

Which one of the methods defined in interface or class with the same name will be called?

JavaChina, SCJP Questions & Answers by Roseanne Zhang (3...
There is no method in interface can be called. Only the actual implementation of that method in class, which implements the interface mentioned, can be called. See similar questions...

Which user interface components implement component orientation in Sun's JREs?

Java Internationalization FAQ
The component orientation property is respected only by Swing components and layout managers, not by peered AWT components. It is independent of the host operating system. The following classes support component orientation in Java SE 6, J2SE 5.0 and J2SE 1.4.2: In J2SE 1.3.1, the following classes shown in the table above do not support component orientation: java.awt.GridBagLayout, javax.swing.BoxLayout, javax.swing.JColorChooser javax.swing.JComboBox, javax.swing.JFileChooser, javax.swing. See similar questions...

How will each interface with the Integrated System?

General Integrated System FAQs
The Integrated Student Information System (ISIS) will not be replaced until Phase 3 of the project. There will be several interfaces between ISIS and the Integrated System to transact business in the areas of financial aid and collection and recording of tuition and fees. Other systems (e.g., Maximo) may never be replaced by the Integrated System if they offer unique features required by the specific business operation. See similar questions...

Explain the ISA and HASA class relationships. How would you implement each in a class design?

Ans: A specialized class "is" a specialization of another class and, therefore, has the ISA relationship with the other class. This relationship is best implemented by embedding an object of the Salary class in the Employee class. See similar questions...

How can I declare an abstract base class to be IMPLEMENT_SERIAL?

MFC Visual C++ FAQ version 4.0 Windows Programming OLE VBX O...
You need a special form of IMPLEMENT_SERIAL that looks like this: Use the regular DECLARE_SERIAL but use IMPLEMENT_SERIAL_ABC shown below instead of IMPLEMENT_SERIAL. #define IMPLEMENT_SERIAL_ABC(class_name, base_class_name, wSchema) _IMPLEMENT_RUNTIMECLASS(class_name, base_class_name, wSchema, NULL) CArchive& AFXAPI operator>>(CArchive& ar, class_name* &pOb) { pOb = (class_name*) ar.ReadObject(RUNTIME_CLASS(class_name)); return ar; } See similar questions...

JDO - Why must my persisten class implement javax.jdo.spi.PersistenceCapable?

Frequently Asked Questions
specified by JDO all persistent classe must implement the interface javax.jdo.spi.PersistenceCapable. If a class does not implement this interface a JDO implementation does not know how to handle it. On the other hand the JDO spec claims to provide transaparent persistence. That is no persistence class is required to implement a specific interface or to be derived from a special base class. See similar questions...

How to implement getCommon method in class a? Are you seeing any problem in the implementation?

Mail Test
Ans: public class a:ICommonImplements1,ICommonImplements2 { public int getCommon() { return 1; } }209. interface IWeather210. {211. void display();212. }213. public class A:IWeather214. {215. public void display()216. {217. MessageBox.Show("A");218. }219. }220. public class B:A221. {222. }223. public class C:B,IWeather224. {225. public void display()226. {227. MessageBox.Show("C");228. }229. } When I instantiate C.display(), will it work? 231. interface IPrint232. {233. string Display();234. See similar questions...

How do we implement this system?

FAQ
Monitoring of some environmental indicators take places regularly (for air quality, waste, water and so on). Yes. Training sessions have been organized by the ISO14001 Steering Group in November 1999, August 2000, December 2000 and November 2001. Records can be found on the UNU ISO14001 Online Forum. The training materials are also available on the UNU ISO14001 Online Forum. See similar questions...

What is the relationship between an event-listener interface and an event-adapter class?

JAVA interview questions
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. See similar questions...

Explore Other Topics

HOW LONG DOES BANKRUPTCY LAST?
What is the difference between a break statement and a continue statement?
How can I get a Replacement Medicare card?
Should I buy a CRT monitor or a flat panel?
What are the advantages of lease/financing?
WHAT ARE THE SYMPTOMS?
What kind of organism is mold?
What time do we need to arrive at the airport to catch our flight to Drake Bay?
How do I enable cookies and Java on my browser?
Do my letter of recommendation and official transcript need to arrive in the same envelope?
How do I configure Jakarta Commons Logging to natively use x4juli ?
How do I open the garage door when there is a power outage?
f. How do I tell what version browser I am currently using?
More Questions >>

© Copyright 2007-2012 QueryCAT
About • Webmasters • Contact