<< < 128 129 130 131 132 133 134 135 136 137 138 > >>   Sort: Date

What is the purpose of the wait(), notify(), and notifyAll() methods?
What is the purpose of the wait(), notify(), and notifyAll() methods? The wait(),notify(), and notifyAll() methods are used to provide an efficient way for threads to wait for a shared resource. When a thread executes an object's wait() method, it enters the waiting state. It only enters the ready s...
2012-10-31, 2429👍, 0💬

How do I include static files within a JSP page?
How do I include static files within a JSP page? Static resources should always be included using the JSP include directive. This way, the inclusion is performed just once during the translation phase. Do note that you should always supply a relative URL for the file attribute. Although you can also...
2013-07-17, 2428👍, 0💬

What does it mean that a method or field is "static"?
What does it mean that a method or field is "static"? Static variables and methods are instantiated only once per class. In other words they are class variables, not instance variables. If you change the value of a static variable in a particular object, the value of that variable changes for all in...
2013-06-20, 2428👍, 0💬

What is the difference between a static and a non-static inner class?
What is the difference between a static and a non-static inner class? A non-static inner class may have object instances that are associated with instances of the class's outer class. A static inner class does not have any object instances.
2012-11-06, 2428👍, 0💬

How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters?
How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters? Unicode requires 16 bits and ASCII require 7 bits. Although the ASCII character set uses only 7 bits, it is usually represented as 8 bits. UTF-8 represents characters using 8, 16, and 18 bit patterns. UTF-16 uses 16-bi...
2012-09-27, 2428👍, 0💬

When is the ArrayStoreException thrown?
When is the ArrayStoreException thrown? When copying elements between different arrays, if the source or destination arguments are not arrays or their types are not compatible, an ArrayStoreException will be thrown.
2012-09-05, 2427👍, 0💬

What are the legal operands of the instanceof operator?
What are the legal operands of the instanceof operator? The left operand is an object reference or null value and the right operand is a class, interface, or array type.
2013-01-01, 2425👍, 0💬

Whats the difference between notify() and notifyAll()?
Whats the difference between notify() and notifyAll()? notify() is used to unblock one waiting thread; notifyAll() is used to unblock all of them. Using notify() is preferable (for efficiency) when only one blocked thread can benefit from the change (for example, when freeing a buffer back into a po...
2013-02-15, 2424👍, 0💬

Can a top level class be private or protected?
Can a top level class be private or protected? No. A top 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 a default access.If a top level class is declared as private the compiler will complain that the "mo...
2013-05-15, 2422👍, 0💬

How do I mix JSP and SSI #include?
How do I mix JSP and SSI #include? Answer 1 If you're just including raw HTML, use the #include directive as usual inside your .jsp file. But it's a little trickier if you want the server to evaluate any JSP code that's inside the included file. If your data.inc file contains jsp code you will have ...
2013-08-05, 2421👍, 0💬

What comes to mind when you hear about a young generation in Java?
What comes to mind when you hear about a young generation in Java? Garbage collection.
2013-04-14, 2420👍, 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-11-14, 2418👍, 0💬

Can you have two files with the same file name in GAC?
Can you have two files with the same file name in GAC? Yes, remember that GAC is a very special folder, and while normally you would not be able to place two files with the same name into a Windows folder, GAC differentiates by version number as well, so it’s possible for MyApp.dll and MyApp.dll ...
2014-12-29, 2417👍, 0💬

The property that indicates whether existing database constraints should be observed when performing updates
The property that indicates whether existing database constraints should be observed when performing updates The property that indicates whether existing database constraints should be observed when performing updates * EnforceConstraints * Constraints * GetConstraints * ConstraintsEnforce EnforceCo...
2014-07-30, 2417👍, 0💬

You are planning to do an indexed search in a list of objects. Which of the two Java collections should you use: ArrayList or Li
You are planning to do an indexed search in a list of objects. Which of the two Java collections should you use: ArrayList or LinkedList? ArrayList
2013-04-16, 2416👍, 0💬

If an object is garbage collected, can it become reachable again?
If an object is garbage collected, can it become reachable again? Once an object is garbage collected, it ceases to exist. It can no longer become reachable again.
2013-01-02, 2415👍, 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-10-25, 2414👍, 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-10-15, 2414👍, 0💬

Which Container method is used to cause a container to be laid out and redisplayed?
Which Container method is used to cause a container to be laid out and redisplayed? validate()
2013-04-12, 2412👍, 0💬

Can one create a method which gets a String and modifies it?
Can one create a method which gets a String and modifies it? No. In Java, Strings are constant or immutable; their values cannot be changed after they are created, but they can be shared. Once you change a string, you actually create a new object. For example: String s = "abc"; //create a new String...
2012-08-24, 2411👍, 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...
2012-07-25, 2411👍, 0💬

What is the common usage of serialization?
What is the common usage of serialization? Whenever an object is to be sent over the network, objects need to be serialized. Moreover if the state of an object is to be saved, objects need to be serilazed.
2013-05-21, 2410👍, 0💬

Which containers may have a MenuBar?
Which containers may have a MenuBar? Frame
2012-10-30, 2408👍, 0💬

How can you force garbage collection?
How can you force garbage collection? You can't force GC, but could request it by calling System.gc(). JVM does not guarantee that GC will be started immediately.
2012-08-03, 2408👍, 0💬

<< < 128 129 130 131 132 133 134 135 136 137 138 > >>   Sort: Date