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

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, 1964👍, 0💬

What is a Java package and how is it used?
What is a Java package and how is it used? A Java package is a naming context for classes and interfaces. A package is used to create a separate name space for groups of classes and interfaces. Packages are also used to organize related classes and interfaces into a single API unit and to control ac...
2013-01-24, 1964👍, 0💬

What is the List interface?
What is the List interface? The List interface provides support for ordered collections of objects.
2013-04-02, 1963👍, 0💬

What method must be implemented by all threads?
What method must be implemented by all threads? All tasks must implement the run() method, whether they are a subclass of Thread or implement the Runnable interface.
2013-01-29, 1962👍, 0💬

What modifiers can be used with a local inner class?
What modifiers can be used with a local inner class? A local inner class may be final or abstract.
2012-12-11, 1962👍, 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, 1962👍, 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, 1961👍, 0💬

How can one prove that the array is not null but empty using one line of code?
How can one prove that the array is not null but empty using one line of code? Print args.length. It will print 0. That means it is empty. But if it would have been null then it would have thrown a NullPointerException on attempting to print args.length.
2013-05-07, 1959👍, 0💬

What is an abstract class?
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), abstract class may contain static data. Any class with an abstract method is automatically abstract ...
2013-04-30, 1959👍, 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, 1959👍, 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, 1959👍, 0💬

How are the elements of a CardLayout organized?
How are the elements of a CardLayout organized? The elements of a CardLayout are stacked, one on top of the other, like a deck of cards.
2012-11-28, 1959👍, 0💬

How to make a class or a bean serializable?
How to make a class or a bean serializable? By implementing either the java.io.Serializable interface, or the java.io.Externalizable interface. As long as one class in a class's inheritance hierarchy implements Serializable or Externalizable, that class is serializable.
2013-04-01, 1958👍, 0💬

What does it mean that a method or class is abstract?
What does it mean that a method or class is abstract? An abstract class cannot be instantiated. Only its subclasses can be instantiated. You indicate that a class is abstract with the abstract keyword like this: public abstract class Container extends Component { Abstract classes may contain abstrac...
2013-02-19, 1957👍, 0💬

What is the relationship between a method's throws clause and the exceptions that can be thrown during the method's execution?
What is the relationship between a method's throws clause and the exceptions that can be thrown during the method's execution? A method's throws clause must declare any checked exceptions that are not caught within the body of the method.
2012-12-27, 1957👍, 0💬

What is externalization? Where is it useful??
What is externalization? Where is it useful?? Use the Externalizable interface when you need complete control over your Bean's serialization (for example, when writing and reading a specific file format).
2013-03-08, 1954👍, 0💬

What are the problems faced by Java programmers who don't use layout managers?
What are the problems faced by Java programmers who don't use layout managers? Without layout managers, Java programmers are faced with determining how their GUI will be displayed across multiple windowing systems and finding a common sizing and positioning that will work within the constraints impo...
2013-01-31, 1954👍, 0💬

Can we define private and protected modifiers for variables in interfaces?
Can we define private and protected modifiers for variables in interfaces? Yes.
2013-02-05, 1953👍, 0💬

What is the purpose of the File class?
What is the purpose of the File class? The File class is used to create objects that provide access to the files and directories of a local file system.
2012-12-12, 1953👍, 0💬

What environment variables do I need to set on my machine in order to be able to run Java programs?
What environment variables do I need to set on my machine in order to be able to run Java programs? CLASSPATH and PATH are the two variables.
2013-05-07, 1952👍, 0💬

What are the Object and Class classes used for?
What are the Object and Class classes used for? The Object class is the highest-level class in the Java class hierarchy. The Class class is used to represent the classes and interfaces that are loaded by a Java program.
2013-01-25, 1951👍, 0💬

If a method is declared as protected, where may the method be accessed?
If a method is declared as protected, where may the method be accessed? A protected method may only be accessed by classes or interfaces of the same package or by subclasses of the class in which it is declared.
2012-12-18, 1951👍, 0💬

Can an exception be rethrown?
Can an exception be rethrown? Yes, an exception can be rethrown.
2012-12-13, 1951👍, 0💬

What is Service Locator pattern?
What is Service Locator pattern? The Service Locator pattern locates J2EE (Java 2 Platform, Enterprise Edition) services for clients and thus abstracts the complexity of network operation and J2EE service lookup as EJB (Enterprise JavaBean) Home and JMS (Java Message Service) component factories. Th...
2013-03-14, 1950👍, 0💬

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