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

Does garbage collection guarantee that a program will not run out of memory?
Does garbage collection guarantee that a program will not run out of memory? No, it doesn't. It is possible for programs to use up memory resources faster than they are garbage collected. It is also possible for programs to create objects that are not subject to garbage collection.
2012-06-25, 2315👍, 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, 2314👍, 0💬

What is thread?
What is thread? A thread is an independent path of execution in a system.
2012-06-07, 2312👍, 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, 2311👍, 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, 2310👍, 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, 2310👍, 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, 2310👍, 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, 2307👍, 0💬

How is it possible for two String objects with identical values not to be equal under the == operator? How are this() and super(
How is it possible for two String objects with identical values not to be equal under the == operator? How are this() and super() used with constructors? The == operator compares two objects to determine if they are the same objects in memory. It is possible for two String objects to have the same v...
2012-08-01, 2304👍, 0💬

What is an Iterator interface?
What is an Iterator interface? The Iterator interface is used to step through the elements of a Collection.
2012-06-21, 2300👍, 0💬

How are this() and super() used with constructors?
How are this() and super() used with constructors? this() is used to invoke a constructor of the same class. super() is used to invoke a superclass constructor.
2012-08-01, 2299👍, 0💬

Is String a primitive data type in Java?
Is String a primitive data type in Java? No String is not a primitive data type in Java, even though it is one of the most extensively used object. Strings in Java are instances of String class defined in java.lang package.
2013-06-25, 2297👍, 0💬

Why Java does not support multiple inheritance ?
Why Java does not support multiple inheritance ? This is a classic question. Yes or No depends on how you look at Java. If you focus on the syntax of "extends" and compare with C++, you may answer 'No' and give explanation to support you. Or you may answer 'Yes'. Recommend you to say 'Yes'. Java DOE...
2012-08-31, 2295👍, 0💬

What is the difference between final, finally and finalize?
What is the difference between final, finally and finalize? Short answer: final - declares constant finally - relates with exception handling finalize - helps in garbage collection If asked to give details, explain: final field, final method, final class try/finally, try/catch/finally protected void...
2012-09-03, 2294👍, 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-06-27, 2293👍, 0💬

Is the ternary operator written x : y ? z or x ? y : z ?
Is the ternary operator written x : y ? z or x ? y : z ? It is written x ? y : z.
2012-11-13, 2292👍, 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, 2289👍, 0💬

Is "abc" a primitive value?
Is "abc" a primitive value? The String literal "abc" is not a primitive value. It is a String object.
2012-12-03, 2288👍, 0💬

Why Java does not support pointers?
Why Java does not support pointers? Because pointers are unsafe. Java uses reference types to hide pointers and programmers feel easier to deal with reference types without pointers. This is why Java and C-sharp shine.
2012-08-22, 2285👍, 0💬

Can a Byte object be cast to a double value?
Can a Byte object be cast to a double value? No, an object cannot be cast to a primitive value.
2012-11-05, 2283👍, 0💬

Is the numeric promotion available in other plantform?
Is the numeric promotion available in other plantform? Yes. Because Java is implemented using a platform-independent virtual machine, bitwise operations always yield the same result, even when run on machines that use radically different CPUs.
2012-07-03, 2281👍, 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, 2280👍, 0💬

What is new with the stop(), suspend() and resume() methods in JDK 1.2??
What is new with the stop(), suspend() and resume() methods in JDK 1.2?? The stop(), suspend() and resume() methods have been deprecated in JDK 1.2.
2012-09-18, 2280👍, 0💬

Calculating Most Frequent Number
Can you write a computer code for the following problem: Given an online stream of infinite numbers, print out the most frequent number. Here is a solution in Java: import java.io.*; import java.util.*; public class MostFrequent { public static void main(String[] a) { int mapMax = 99; // Most freque...
2013-12-19, 2278👍, 0💬

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