KyaPoocha.com

Huge Collection of Interview Questions


Archive for April, 2008

Can a level class be private or protected ? 

No. A level class can not be private or protected. It can have either “public” or no modifier. If it does not have a modifier it is supposed to have... Read more »

What is the default value of an object reference declared as an instance variable ? 

null unless we define it explicitly.  Read more »

Does importing a package imports the subpackages as well? e.g. Does importing com.MyTest.* also import com.MyTest.UnitTests.* ? 

No you will have to import the subpackages explicitly. Importing com.MyTest.* will import classes in the package MyTest only. It will not import any class in any... Read more »

Are the imports checked for validity at compile time? e.g. will the code containing an import such as java.lang.ABCD compile ? 

Yes the imports are checked for the semantic validity at compile time. The code containing above line of import will not compile. It will throw an error saying,can... Read more »

If I do not provide any arguments on the command line, then the String array of Main method will be empty of null ? 

It is empty. But not null.  Read more »

What is final ? 

A final class can’t be extended ie., final class may not be subclassed. A final method can’t be overridden when its class is inherited. You can’t... Read more »

What is an abstract class ? 

Abstract class must be extended/subclassed (to be useful). It serves as a template. A class that is abstract may not be instantiated (ie, you may not call its constructor),... Read more »

State the significance of public, private, protected, default modifiers both singly and in combination and state the effect of package relationships on declared items qualified by these modifiers ? 

public : Public class is visible in other packages, field is visible everywhere (class must be public too) private : Private variables or methods may be used only... Read more »

Difference between Swing and Awt ? 

AWT are heavy-weight componenets. Swings are light-weight components. Hence swing works faster than AWT.  Read more »

Explain different way of using thread ? 

The thread could be implemented by using runnable interface or by inheriting from the Thread class. The former is more advantageous, ’cause when you are going... Read more »

What is the difference between an Interface and an Abstract class ? 

An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement... Read more »

Short C# Interview Questions. 

1.    What’s the .NET datatype that allows the retrieval of data by a unique key? Ans.  HashTable. 2.    What’s class SortedList underneath? Ans.  A... Read more »

What’s a satellite assembly ? 

When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized... Read more »

How’s the DLL Hell problem solved in .NET ? 

Assembly versioning allows the application to specify not only the library it needs to run (which was available under Win32), but also the version of the assembly.  Read more »

What’s a multicast delegate ? 

It’s a delegate that points to and eventually fires off several methods.  Read more »

Page 2 of 15«12345»...Last »