More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know.
Ans. Performance of a system doesn't solely rely on size of processor or it's communication size. It should also be compatible with other resources like memory, storage etc. Moreover it makes no sense to have 64 bit systems when there is hardly any software than can run on 64 bit system.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Garbage collection mechanism frees up the memory that is no longer needed. In languages like C / C++ the deallocation needs to be done explicitly by the programmer and hence any leniency may result in memory leak. Garbage collection in java ensures that all unused memory is reclaimed and hence there are no memory leaks.Moreover it relieves the programmer from the hassle of carefully releasing all memory.
Help us improve. Please let us know the company, where you were asked this question :
Empty the 5 litre can into the 3 litre can leaving 2 litres in the 5 litre can.
Pour away the contents of the 3 litre can.Fill the 3 litre can with the 2 litres from the 5 litre can leaving 2 litres in the 3 litre can.
Fill the 5 litre can from the tap.Fill the remaining 1 litre space in the 3 litre can from the 5 litre can.Leaving 4 litres in the 5 litre can.
Number 2 -
Fill the 3 litre can from the tap.Empty the contents of the 3 litre can into the 5 litre can.
Fill the 3 litre can from the tap.Empty the contents of the 3 litre can into the 5 litre can leaving the 5 litre can full and 1 litre in the 3 litre can.
Pour away the contents of the 5 litre can. Pour the 1 litre from the 3 litre can into the 5 litre can.
Fill the 3 litre can from the tap. Empty the contents of the 3 litre can into the 5 litre can leaving 4 litres in the 5 litre can.
Help us improve. Please let us know the company, where you were asked this question :
Ans. A gobbler class take care of reading from a stream and optionally write out to another stream. Allows for non blocking reads when invoking a process through Runtime.exec(). Moreover the user can specify a callback that is called whenever anything is read from the stream.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Primary Key constraint means that the column(s) should be unique and doesn't allow null. So Primary key constraint implies unique and not null constraint too.
Unique constraint implies not null constraint too as allowing null would violate uniqueness on those columns.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Unique constraint ensures that a columns or combination or columns are always unique in a table and hence doesn't allow null or duplicates to be entered for the column or combination of columns.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Application is unable to insert a record as it violates a unique constraint.
The exception states the constraint and Table can be located by the Entity mapping. So I will go to the DB and will first check to which all columns the unique constraint applies. And then I will go and check the code and logs to see how come the duplicate column values were attempted to be inserted when they were not supposed to be.
Help us improve. Please let us know the company, where you were asked this question :
Ans. We can declare the reference as final to avoid reassignment but again we can always initialize the final reference to null. Even if there was any such facility available , it would have meant poor use of resources by assigning a new object in memory to each reference that's created. Many a times references are just meant to refer to other objects which already have a reference i.e sharing object by multiple references.
Help us improve. Please let us know the company, where you were asked this question :
Null value means that the value is yet to be assigned or need not be assigned whereas empty value means that the blank value has already been assigned once. Null is the default for the null able columns that hasn't be assigned any value.
Help us improve. Please let us know the company, where you were asked this question :