<< < 138 139 140 141 142 143 144 145 146 147 148 > >>   Sort: Date

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-12-07, 2176👍, 0💬

What one should take care of while serializing the object?
What one should take care of while serializing the object? One should make sure that all the included objects are also serializable. If any of the objects is not serializable then it throws a NotSerializableException.
2013-05-23, 2175👍, 0💬

The superclass constructor runs before the subclass constructor ...
The superclass constructor runs before the subclass constructor ... The superclass constructor runs before the subclass constructor. The subclass's version of the overridable method will be invoked before the subclass's constructor has been invoked. If the subclass's overridable method depends on th...
2013-03-06, 2175👍, 0💬

What is Externalizable?
What is Externalizable? Externalizable is an Interface that extends Serializable Interface. And sends data into Streams in Compressed Format. It has two methods, writeExternal(ObjectOuput out) and readExternal(ObjectInput in)
2013-02-05, 2175👍, 0💬

What are the high-level thread states?
What are the high-level thread states? The high-level thread states are ready, running, waiting, and dead.
2012-11-02, 2175👍, 0💬

Can you make an instance of an abstract class? For example - java.util.Calender is an abstract class with a method getInstance()
Can you make an instance of an abstract class? For example - java.util.Calender is an abstract class with a method getInstance() which returns an instance of the Calender class. No! You cannot make an instance of an abstract class. An abstract class has to be sub-classed. If you have an abstract cla...
2012-08-21, 2175👍, 0💬

Give a simplest way to find out the time a method takes for execution without using any profiling tool?
Give a simplest way to find out the time a method takes for execution without using any profiling tool? Read the system time just before the method is invoked and immediately after method returns. Take the time difference, which will give you the time taken by a method for execution. To put it in co...
2013-05-24, 2174👍, 0💬

What is an Iterator?
What is an Iterator? Some of the collection classes provide traversal of their contents via a java.util.Iterator interface. This interface allows you to walk through a collection of objects, operating on each object in turn. Remember when using Iterators that they contain a snapshot of the collectio...
2013-04-29, 2174👍, 0💬

What modifiers are allowed for methods in an Interface?
What modifiers are allowed for methods in an Interface? Only public and abstract modifiers are allowed for methods in interfaces.
2013-06-19, 2173👍, 0💬

malloc is returning crazy pointer values ...
malloc is returning crazy pointer values, I have included the line extern void *malloc(); before I call it. malloc accepts an argument of type size_t, and size_t may be defined as unsigned long. If you are passing ints (or even unsigned ints), malloc may be receiving garbage (or similarly if you are...
2016-04-15, 2172👍, 0💬

What are Checked and UnChecked Exception?
What are Checked and UnChecked Exception? A checked exception is some subclass of Exception (or Exception itself), excluding class RuntimeException and its subclasses. Making an exception checked forces client programmers to deal with the possibility that the exception will be thrown. eg, IOExceptio...
2013-05-10, 2172👍, 0💬

Explain the user defined Exceptions?
Explain the user defined Exceptions? User defined Exceptions are the separate Exception classes defined by the user for specific purposed. An user defined can created by simply sub-classing it to the Exception class. This allows custom exceptions to be generated (using throw) and caught in the same ...
2013-02-22, 2172👍, 0💬

What does `$result = f() .. g()' really return?
What does `$result = f() .. g()' really return? False so long as f() returns false, after which it returns true until g() returns true, and then starts the cycle again. This is scalar not list context, so we have the bistable flip-flop range operator famous in parsing of mail messages, as in `$in_bo...
2013-09-06, 2170👍, 0💬

What is the difference between preemptive scheduling and time slicing?
What is the difference between preemptive scheduling and time slicing? Under preemptive scheduling, the highest priority task executes until it enters the waiting or dead states or a higher priority task comes into existence. Under time slicing, a task executes for a predefined slice of time and the...
2013-06-07, 2170👍, 0💬

What is a Manifest?
What is a Manifest? An assembly manifest contains all the metadata needed to specify the assembly's version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to resources and classes. The assembly manifest can be stored in either a...
2013-10-08, 2169👍, 0💬

What is the Map interface?
What is the Map interface? The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys with values.
2012-11-26, 2169👍, 0💬

Difference between Vector and ArrayList?
Difference between Vector and ArrayList? Vector is synchronized whereas arraylist is not.
2013-04-26, 2168👍, 0💬

What restrictions are placed on method overriding?
What restrictions are placed on method overriding? Overridden methods must have the same name, argument list, and return type. The overriding method may not limit the access of the method it overrides. The overriding method may not throw any exceptions that may not be thrown by the overridden method...
2013-01-14, 2168👍, 0💬

Does Java pass by Value or reference?
Does Java pass by Value or reference? Its uses Reference while manipulating objects but pass by value when sending method arguments. Those who feel why I added this simple question in this section while claiming to be maintaining only strong and interesting questions, go ahead and answer following q...
2013-03-20, 2167👍, 0💬

What are synchronized methods and synchronized statements?
What are synchronized methods and synchronized statements? Synchronized methods are methods that are used to control access to an object. A thread only executes a synchronized method after it has acquired the lock for the method's object or class. Synchronized statements are similar to synchronized ...
2013-06-18, 2166👍, 0💬

What are runtime exceptions?
What are runtime exceptions? Runtime exceptions are those exceptions that are thrown at runtime because of either wrong input data or because of wrong business logic etc. These are not checked by the compiler at compile time.
2013-05-28, 2166👍, 0💬

Describe the wrapper classes in Java.
Describe the wrapper classes in Java. Wrapper class is wrapper around a primitive data type. An instance of a wrapper class contains, or wraps, a primitive value of the corresponding type. Following table lists the primitive types and the corresponding wrapper classes: Primitive Wrapper boolean java...
2013-03-05, 2166👍, 0💬

What is the difference between a while statement and a do statement?
What is the difference between a while statement and a do statement? A while statement checks at the beginning of a loop to see whether the next loop iteration should occur. A do statement checks at the end of a loop to see whether the next iteration of a loop should occur. The do statement will alw...
2012-12-07, 2166👍, 0💬

What type of code (server or client) is found in a Code-Behind class?
What type of code (server or client) is found in a Code-Behind class? C#
2014-01-16, 2165👍, 0💬

<< < 138 139 140 141 142 143 144 145 146 147 148 > >>   Sort: Date