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

What is the differnce between final, finally and finalize?
What is the differnce between final, finally and finalize? final is used for making a class no-subclassable, and making a member variable as a constant which cannot be modified. finally is usuall used to release all the resources utilized inside the try block. All the resources present in the finali...
2012-09-10, 2601👍, 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, 2601👍, 0💬

Can a lock be acquired on a class?
Can a lock be acquired on a class? Yes, a lock can be acquired on a class. This lock is acquired on the class's Class object.
2012-09-17, 2600👍, 0💬

When a thread is created and started, what is its initial state?
When a thread is created and started, what is its initial state? A thread is in the ready state after it has been created and started.
2013-06-07, 2597👍, 0💬

What method is used to specify a container's layout?
What method is used to specify a container's layout? The setLayout() method is used to specify a container's layout.
2012-09-19, 2597👍, 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, 2594👍, 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, 2592👍, 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, 2592👍, 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, 2591👍, 0💬

ArithmeticException?
ArithmeticException? The ArithmeticException is thrown when integer is divided by zero or taking the remainder of a number by zero. It is never thrown in floating-point operations.
2012-09-12, 2590👍, 0💬

What restrictions are placed on the location of a package statement within a source code file?
What restrictions are placed on the location of a package statement within a source code file? A package statement must appear as the first line in a source code file (excluding blank lines and comments).
2012-10-02, 2589👍, 0💬

What is the output of x &gt y? a:b = p*q when x=1,y=2,p=3,q=4?
What is the output of x &gt y? a:b = p*q when x=1,y=2,p=3,q=4? When this kind of question has been asked, find the problems you think is necessary to ask back before you give an answer. Ask if variables a and b have been declared or initialized. If the answer is yes. You can say that the syntax ...
2012-08-21, 2586👍, 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, 2583👍, 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, 2581👍, 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, 2581👍, 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, 2581👍, 0💬

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, 2580👍, 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, 2580👍, 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-07-03, 2580👍, 0💬

What is daemon thread and which method is used to create the daemon thread?
What is daemon thread and which method is used to create the daemon thread? Daemon thread is a low priority thread which runs intermittently in the back ground doing the garbage collection operation for the java runtime system. setDaemon method is used to create a daemon thread.
2013-06-14, 2579👍, 0💬

If I write return at the end of the try block, will the finally block still execute?
If I write return at the end of the try block, will the finally block still execute? Yes even if you write return as the last statement in the try block and no exception occurs, the finally block will execute. The finally block will execute and then the control return.
2013-06-04, 2574👍, 0💬

What is the ResourceBundle class?
What is the ResourceBundle class? The ResourceBundle class is used to store locale-specific resources that can be loaded by a program to tailor the program's appearance to the particular locale in which it is being run.
2012-08-07, 2570👍, 0💬

What is the purpose of the System class?
What is the purpose of the System class? The purpose of the System class is to provide access to system resources.
2012-07-07, 2567👍, 0💬

The following statement prints true or false, why?
The following statement prints true or false, why? byte[] a = { 1, 2, 3 };, byte[] b = (byte[]) a.clone(); System.out.println(a == b); The false will be printed out. Because the two arrays have distinctive memory addresses. Starting in Java 1.2, we can use java.util.Arrays.equals(a, b) to compare wh...
2012-09-11, 2566👍, 0💬

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