<< < 132 133 134 135 136 137 138 139 140 141 142 > >>   Sort: Date

What's the difference between a queue and a stack?
What's the difference between a queue and a stack? Stacks works by last-in-first-out rule (LIFO), while queues use the FIFO rule
2013-04-12, 2265👍, 0💬

Why is catch(Exception) almost always a bad idea?
Why is catch(Exception) almost always a bad idea? Well, if at that point you know that an error has occurred, then why not write the proper code to handle that error instead of passing a new Exception object to the catch block? Throwing your own exceptions signifies some design flaws in the project.
2014-02-24, 2263👍, 0💬

How can I customize the seralization process? i.e. how can one have a control over the serialization process?
How can I customize the seralization process? i.e. how can one have a control over the serialization process? Yes it is possible to have control over serialization process. The class should implement Externalizable interface. This interface contains two methods namely readExternal and writeExternal....
2013-05-21, 2263👍, 0💬

Can you inherit a COM class in a .NET application?
Can you inherit a COM class in a .NET application? The .NET Framework extends the COM model for reusability by adding implementation inheritance. Managed types can derive directly or indirectly from a COM coclass; more specifically, they can derive from the runtime callable wrapper generated by the ...
2014-12-10, 2262👍, 0💬

What is serialization?
What is serialization? Serialization is a mechanism by which you can save the state of an object by converting it to a byte stream.
2013-05-17, 2261👍, 0💬

Can Java code be compiled to machine dependent executable file?
Can Java code be compiled to machine dependent executable file? Yes. There are many tools out there. If you did so, the generated exe file would be run in the specific platform, not cross-platform.
2013-04-06, 2261👍, 0💬

What is the test coverage?
From the following code, atleast how many test cases are needed to guarantee 100%coverage Input Number_of_Coins Total=0 While Number_of_Coins>0 Input Value_of_Coin Total=Total + Value_of_Coin Number_Of_Coins=Number_of_Coin s- 1 End Loop Print "Your coins are worth" & Total What is the correct op...
2014-11-24, 2260👍, 0💬

What are the different ways to handle exceptions?
What are the different ways to handle exceptions? There are two ways to handle exceptions, 1. By wrapping the desired code in a try block followed by a catch block to catch the exceptions. and 2. List the desired exceptions in the throws clause of the method and let the caller of the method hadle th...
2013-05-31, 2259👍, 0💬

What does it mean?
Is char a[3] = "abc"; legal? What does it mean? It is legal in ANSI C (and perhaps in a few pre-ANSI systems), though useful only in rare circumstances. It declares an array of size three, initialized with the three characters 'a', 'b', and 'c', without the usual terminating '\0' character. The arra...
2015-12-09, 2257👍, 0💬

What is synchronization and why is it important?
What is synchronization and why is it important? With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of...
2013-06-05, 2257👍, 0💬

What are stored procedures? How is it useful?
What are stored procedures? How is it useful? A stored procedure is a set of statements/commands which reside in the database. The stored procedure is pre-compiled and saves the database the effort of parsing and compiling sql statements everytime a query is run. Each database has its own stored pro...
2013-07-17, 2256👍, 0💬

In the Servlet 2.4 specification SingleThreadModel has been deprecated, why?
In the Servlet 2.4 specification SingleThreadModel has been deprecated, why? Because it is not practical to have such model. Whether you set isThreadSafe to true or false, you should take care of concurrent client requests to the JSP page by synchronizing access to any shared objects defined at the ...
2013-07-16, 2256👍, 0💬

What if the main method is declared as private?
What if the main method is declared as private? The program compiles properly but at runtime it will give "Main method not public." message.
2013-05-02, 2255👍, 0💬

Describe synchronization in respect to multithreading.
Describe synchronization in respect to multithreading. With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchonization, it is possible for one thread to modify a shared variable while another thread is in the pro...
2013-04-23, 2255👍, 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 access. This means that the class can only be accessed by other classes and interfaces that are defined within the same package.
2012-11-16, 2255👍, 0💬

How do I prevent the output of my JSP or Servlet pages from being cached by the browser?
How do I prevent the output of my JSP or Servlet pages from being cached by the browser? You will need to set the appropriate HTTP header attributes to prevent the dynamic content output by the JSP page from being cached by the browser. Just execute the following scriptlet at the beginning of your J...
2013-07-23, 2254👍, 0💬

Which class is the immediate superclass of the MenuComponent class.
Which class is the immediate superclass of the MenuComponent class. Object
2012-10-17, 2254👍, 0💬

What must a class do to implement an interface?
What must a class do to implement an interface? It must provide all of the methods in the interface and identify the interface in its implements clause.
2012-10-26, 2252👍, 0💬

What is static in java?
What is static in java? Static means one per class, not one for each object no matter how many instance of a class might exist. This means that you can use them without creating an instance of a class.Static methods are implicitly final, because overriding is done based on the type of the object, an...
2013-05-01, 2250👍, 0💬

Explain different way of using thread?
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 for multiple inheritance..the only interface can help.
2013-04-24, 2250👍, 0💬

What is the range of the short type?
What is the range of the short type? The range of the short type is -(2^15) to 2^15 - 1.
2012-10-15, 2250👍, 0💬

What is the return type of a program's main() method?
What is the return type of a program's main() method? A program's main() method has a void return type.
2012-12-21, 2249👍, 0💬

How to Retrieve Warnings?
How to Retrieve Warnings? SQLWarning objects are a subclass of SQLException that deal with database access warnings. Warnings do not stop the execution of an application, as exceptions do; they simply alert the user that something did not happen as planned. A warning can be reported on a Connection ...
2013-07-15, 2248👍, 0💬

What are some alternatives to inheritance?
What are some alternatives to inheritance? Delegation is an alternative to inheritance. Delegation means that you include an instance of another class as an instance variable, and forward messages to the instance. It is often safer than inheritance because it forces you to think about each message y...
2013-06-19, 2248👍, 0💬

<< < 132 133 134 135 136 137 138 139 140 141 142 > >>   Sort: Date