<< < 18 19 20 21 22 23 24 25 26 27 > >>   Sort: Date

What restrictions are placed on method overriding?
What restrictions are placed on method overriding? Overridden methods must have the same name, argument list, and return type. The overriding method may not limit the access of the method it overrides. The overriding method may not throw any exceptions that may not be thrown by the overridden method...
2013-01-14, 2227👍, 0💬

What is the Map interface?
What is the Map interface? The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys with values.
2012-11-26, 2227👍, 0💬

What is an Iterator?
What is an Iterator? Some of the collection classes provide traversal of their contents via a java.util.Iterator interface. This interface allows you to walk through a collection of objects, operating on each object in turn. Remember when using Iterators that they contain a snapshot of the collectio...
2013-04-29, 2226👍, 0💬

Can we make an EJB singleton?
Can we make an EJB singleton? This is a debatable question, and for every answer we propose there can be contradictions. I propose 2 solutions fo the same. Remember that EJB's are distributed componenets and can be deployed on different JVM's in a Distributed environment i) Follow the steps as given...
2013-03-18, 2226👍, 0💬

What is the Java API?
What is the Java API? The Java API is a large collection of ready-made software components that provide many useful capabilities, such as graphical user interface (GUI) widgets.
2013-02-20, 2226👍, 0💬

What is the difference between an if statement and a switch statement?
What is the difference between an if statement and a switch statement? The if statement is used to select among two alternatives. It uses a boolean expression to decide which alternative should be executed. The switch statement is used to select among multiple alternatives. It uses an int expression...
2013-02-01, 2225👍, 0💬

What is a local, member and a class variable?
What is a local, member and a class variable? Variables declared within a method are "local" variables. Variables declared within the class i.e not within any methods are "member" variables (global variables). Variables declared within the class i.e not within any methods and are defined as "static"...
2013-02-06, 2224👍, 0💬

What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body
What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement? The exception propagates up to the next higher level try-catch statement (if any) or results in the program's termination.
2013-01-18, 2224👍, 0💬

Difference between Vector and ArrayList?
Difference between Vector and ArrayList? Vector is synchronized whereas arraylist is not.
2013-04-26, 2221👍, 0💬

What is the difference between the Boolean & operator and the && operator?
What is the difference between the Boolean & operator and the && operator? If an expression involving the Boolean & operator is evaluated, both operands are evaluated. Then the & operator is applied to the operand. When an expression involving the && operator is evaluated...
2012-10-18, 2221👍, 0💬

Are true and false keywords?
Are true and false keywords? The values true and false are not keywords.
2013-01-04, 2220👍, 0💬

What is the difference between a while statement and a do statement?
What is the difference between a while statement and a do statement? A while statement checks at the beginning of a loop to see whether the next loop iteration should occur. A do statement checks at the end of a loop to see whether the next iteration of a loop should occur. The do statement will alw...
2012-12-07, 2220👍, 0💬

Give a simplest way to find out the time a method takes for execution without using any profiling tool?
Give a simplest way to find out the time a method takes for execution without using any profiling tool? Read the system time just before the method is invoked and immediately after method returns. Take the time difference, which will give you the time taken by a method for execution. To put it in co...
2013-05-24, 2219👍, 0💬

Does Java provide any construct to find out the size of an object?
Does Java provide any construct to find out the size of an object? No there is not sizeof operator in Java. So there is not direct way to determine the size of an object directly in Java.
2013-05-24, 2219👍, 0💬

What are Access Specifiers available in Java?
What are Access Specifiers available in Java? ccess specifiers are keywords that determines the type of access to the member of a class. These are: Public Protected Private Defaults
2013-03-04, 2219👍, 0💬

What advantage do Java's layout managers provide over traditional windowing systems?
What advantage do Java's layout managers provide over traditional windowing systems? Java uses layout managers to lay out components in a consistent manner across all windowing platforms. Since Java's layout managers aren't tied to absolute sizing and positioning, they are able to accommodate platfo...
2012-12-10, 2219👍, 0💬

Name the eight primitive Java types.
Name the eight primitive Java types. The eight primitive types are byte, char, short, int, long, float, double, and boolean.
2012-11-29, 2218👍, 0💬

What are synchronized methods and synchronized statements?
What are synchronized methods and synchronized statements? Synchronized methods are methods that are used to control access to an object. A thread only executes a synchronized method after it has acquired the lock for the method's object or class. Synchronized statements are similar to synchronized ...
2013-06-18, 2217👍, 0💬

What interface must an object implement before it can be written to a stream as an object?
What interface must an object implement before it can be written to a stream as an object? An object must implement the Serializable or Externalizable interface before it can be written to a stream as an object.
2013-01-10, 2217👍, 0💬

Can you make an instance of an abstract class? For example - java.util.Calender is an abstract class with a method getInstance()
Can you make an instance of an abstract class? For example - java.util.Calender is an abstract class with a method getInstance() which returns an instance of the Calender class. No! You cannot make an instance of an abstract class. An abstract class has to be sub-classed. If you have an abstract cla...
2012-08-21, 2217👍, 0💬

What is the purpose of finalization?
What is the purpose of finalization? The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected.
2013-06-11, 2216👍, 0💬

What are generations in Garbage Collection terminolgy? What is its relevance?
What are generations in Garbage Collection terminolgy? What is its relevance? Garbage Collectors make assumptions about how our application runs. Most common assumption is that an object is most likely to die shortly after it was created: called infant mortality. This assumes that an object that has...
2013-03-22, 2215👍, 0💬

Explain the user defined Exceptions?
Explain the user defined Exceptions? User defined Exceptions are the separate Exception classes defined by the user for specific purposed. An user defined can created by simply sub-classing it to the Exception class. This allows custom exceptions to be generated (using throw) and caught in the same ...
2013-02-22, 2214👍, 0💬

Can try statements be nested?
Can try statements be nested? Try statements may be tested.
2013-01-23, 2213👍, 0💬

<< < 18 19 20 21 22 23 24 25 26 27 > >>   Sort: Date