<< < 4 5 6 7 8 9 10 11 12 13 14 > >>   Sort: Date

Why do threads block on I/O?
Why do threads block on I/O? Threads block on I/O (that is enters the waiting state) so that other threads may execute while the I/O Operation is performed.
2012-09-14, 2286👍, 0💬

Can we use System.arraycopy() method to copy the same array?
Can we use System.arraycopy() method to copy the same array? Yes, you can. The source and destination arrays can be the same if you want to copy a subset of the array to another area within that array.
2012-09-04, 2284👍, 0💬

How to define an Interface?
How to define an Interface? In Java Interface defines the methods but does not implement them. Interface can include constants. A class that implements the interfaces is bound to implement all the methods defined in Interface. Emaple of Interface: public interface sampleInterface { public void funct...
2012-05-24, 2284👍, 0💬

How can a GUI component handle its own events?
How can a GUI component handle its own events? A component can handle its own events by implementing the required event-listener interface and adding itself as its own event listener.
2012-07-24, 2283👍, 0💬

Can an anonymous class be declared as implementing an interface and extending a class?
Can an anonymous class be declared as implementing an interface and extending a class? An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.
2012-06-28, 2283👍, 0💬

What happens when a thread cannot acquire a lock on an object?
What happens when a thread cannot acquire a lock on an object? If a thread attempts to execute a synchronized method or synchronized statement and is unable to acquire an object's lock, it enters the waiting state until the lock becomes available.
2012-06-18, 2282👍, 0💬

What is the Locale class?
What is the Locale class? The Locale class is used to tailor program output to the conventions of a particular geographic, political, or cultural region.
2012-07-09, 2280👍, 0💬

What are the different identifier states of a Thread?
What are the different identifier states of a Thread? The different identifiers of a Thread are: R - Running or runnable thread S - Suspended thread CW - Thread waiting on a condition variable MW - Thread waiting on a monitor lock MS - Thread suspended waiting on a monitor lock
2013-02-07, 2279👍, 0💬

Is Java a super set of JavaScript?
Is Java a super set of JavaScript? No. They are completely different. Some syntax may be similar.
2012-08-13, 2274👍, 0💬

What's the main difference between a Vector and an ArrayList?
What's the main difference between a Vector and an ArrayList? Java Vector class is internally synchronized and ArrayList is not.
2012-06-22, 2274👍, 0💬

What are the different scopes for Java variables?
What are the different scopes for Java variables? The scope of a Java variable is determined by the context in which the variable is declared. Thus a java variable can have one of the three scopes at any given point in time. 1. Instance : - These are typical object level variables, they are initiali...
2013-06-28, 2273👍, 0💬

Name primitive Java types.
Name primitive Java types. The primitive types are byte, char, short, int, long, float, double, and boolean.
2012-07-23, 2273👍, 0💬

Can Java object be locked down for exclusive use by a given thread?
Can Java object be locked down for exclusive use by a given thread? Yes. You can lock an object by putting it in a "synchronized" block. The locked object is inaccessible to any thread other than the one that explicitly claimed it.
2012-06-11, 2273👍, 0💬

What are the drawbacks of inheritance?
What are the drawbacks of inheritance? Since inheritance inherits everything from the super class and interface, it may make the subclass too clustering and sometimes error-prone when dynamic overriding or dynamic overloading in some situation. In addition, the inheritance may make peers hardly unde...
2012-08-29, 2270👍, 0💬

What is thread?
What is thread? A thread is an independent path of execution in a system.
2012-06-07, 2270👍, 0💬

What is an abstract method?
What is an abstract method? An abstract method is a method whose implementation is deferred to a subclass. Or, a method that has no implementation.
2012-07-10, 2269👍, 0💬

What is the purpose of the Runtime class?
What is the purpose of the Runtime class? The purpose of the Runtime class is to provide access to the Java runtime system.
2012-07-07, 2267👍, 0💬

What is a static method?
What is a static method? A static method is a method that belongs to the class rather than any object of the class and doesn't apply to an object or even require that any objects of the class have been instantiated.
2012-07-11, 2259👍, 0💬

What's the difference between an interface and an abstract class?
What's the difference between an interface and an abstract class? An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implemen...
2012-05-21, 2258👍, 0💬

What state does a thread enter when it terminates its processing?
What state does a thread enter when it terminates its processing? When a thread terminates its processing, it enters the dead state.
2012-09-20, 2257👍, 0💬

What is the difference between a Window and a Frame?
What is the difference between a Window and a Frame? Heavy weight components like Abstract Window Toolkit (AWT), depend on the local windowing toolkit. For example, java.awt.Button is a heavy weight component, when it is running on the Java platform for Unix platform, it maps to a real Motif button....
2012-07-16, 2256👍, 0💬

Why would you use a synchronized block vs. synchronized method?
Why would you use a synchronized block vs. synchronized method? Synchronized blocks place locks for shorter periods than synchronized methods.
2012-07-27, 2254👍, 0💬

When is the ArithmeticException throwQuestion: What is the GregorianCalendar class?
When is the ArithmeticException throwQuestion: What is the GregorianCalendar class? The GregorianCalendar provides support for traditional Western calendars.
2012-07-04, 2254👍, 0💬

How are the elements of a GridBagLayout organized?
How are the elements of a GridBagLayout organized? The elements of a GridBagLayout are organized according to a grid. However, the elements are of different sizes and may occupy more than one row or column of the grid. In addition, the rows and columns may have different sizes.
2012-07-24, 2252👍, 0💬

<< < 4 5 6 7 8 9 10 11 12 13 14 > >>   Sort: Date