<< < 9 10 11 12 13 14 15 16 17 18 19 > >>   Sort: Date

Which non-Unicode letter characters may be used as the first character of an identifier?
Which non-Unicode letter characters may be used as the first character of an identifier? The non-Unicode letter characters $ and _ may appear as the first character of an identifier
2012-12-19, 2165👍, 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, 2165👍, 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, 2164👍, 0💬

What is the difference between the String and StringBuffer classes?
What is the difference between the String and StringBuffer classes? String objects are constants. StringBuffer objects are not.
2012-11-06, 2154👍, 0💬

What is clipping?
What is clipping? Clipping is the process of confining paint operations to a limited area or shape.
2012-10-08, 2153👍, 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, 2152👍, 0💬

What is the difference between Swing and AWT components?
What is the difference between Swing and AWT components? AWT components are heavy-weight, whereas Swing components are lightweight. Heavy weight components 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 Uni...
2012-08-22, 2152👍, 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, 2151👍, 0💬

In which case would you choose a static inner class?
In which case would you choose a static inner class? Interesting one, static inner classes can access the outer class's protected and private fields. This is both a positive and a negitive point for us since we can, in essence, violate the encapsulation of the outer class by mucking up the outer cla...
2012-09-07, 2149👍, 0💬

What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy? The Reader/Writer class hierarchy is character-oriented, and the InputStream/OutputStream class hierarchy is byte-oriented.
2012-11-15, 2146👍, 0💬

Is null a keyword?
Is null a keyword? The null value is not a keyword.
2012-09-18, 2144👍, 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, 2141👍, 0💬

What are order of precedence and associativity, and how are they used?
What are order of precedence and associativity, and how are they used? Order of precedence determines the order in which operators are evaluated in expressions. Associatity determines whether an expression is evaluated left-to-right or right-to-left
2012-10-09, 2141👍, 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.
2012-08-08, 2141👍, 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...
2012-09-17, 2139👍, 0💬

What if I write static public void instead of public static void?
What if I write static public void instead of public static void? Program compiles and runs properly.
2013-05-03, 2136👍, 0💬

Why are the interfaces more flexible than abstract classes?
Why are the interfaces more flexible than abstract classes? --An interface-defined type can be implemented by any class in a class hierarchy and can be extended by another interface. In contrast, an abstract-class-defined type can be implemented only by classes that subclass the abstract class. --An...
2013-03-06, 2136👍, 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, 2136👍, 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, 2136👍, 0💬

What is the argument type of a program's main() method?
What is the argument type of a program's main() method? A program's main() method takes an argument of the String[] type.
2012-10-24, 2136👍, 0💬

What is a native method?
What is a native method? A native method is a method that is implemented in a language other than Java.
2012-10-08, 2136👍, 0💬

Can a double value be cast to a byte?
Can a double value be cast to a byte? Yes, a double value can be cast to a byte.
2012-10-25, 2134👍, 0💬

Name three Component subclasses that support painting.
Name three Component subclasses that support painting. The Canvas, Frame, Panel, and Applet classes support painting.
2012-10-04, 2134👍, 0💬

Where and how can you use a private constuctor.
Where and how can you use a private constuctor. Private constructor can be used if you do not want any other class to instanstiate it by using new. The instantiation is done from a static public method, which is used when dealing with the factory method pattern.
2012-08-17, 2132👍, 0💬

<< < 9 10 11 12 13 14 15 16 17 18 19 > >>   Sort: Date