Interview Questions and Answers for 'A' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 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.
Label / Company      Label / Company / Text

   



Interview Questions and Answers - Order By Newest

   next 30
 Q1591. How do you Organize and prioritize your work ?General
Ans. [Open Ended answer]

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q1592. How do you maintain configuration values in your existing applications ?General
Ans. [Open Ended Answer]

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q1593. If your colleague didn't finish their tasks and there was a deadline coming up, would you finish it for them? General
Ans. [Open Ended Answer]

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q1594. Can StringBuffer and StringBuilder in Java be inherited?Core Java
Ans. No, they have been declared final and hence cannot be extended.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     StringBuffer  StringBuilder


 Q1595. what is the use of Null is Java ?Core Java
Ans. whenever a reference is created in Java without assigning the object

like

String str;

It get's assigned to null. So null provides a temporary memory location which any reference can point to till an appropriate object is assigned. Moreover it denotes that nothing has been assigned yet and hence provides a check in many cases.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     null


 Q1596. Does assigning null and assigning empty object same in Java ?Core Java
Ans. Null means nothing and hence means it's being assigned something till anything can be assigned to the reference. Null is a common memory location that get's assigned to any object reference till an actual object is assigned.

Empty object may not have a programmer initialized state but still a separate object in memory that has been assigned the placeholders.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     null


 Q1597. Does null and empty value for a column in Table means same ?Database
Ans. No.

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 :   

   Like         Discuss         Correct / Improve     


 Q1598. Doesn't it make sense to necessarily initialize references to some object to avoid NullPointerExceptions ? Can this be done ?Core Java
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 :   

   Like         Discuss         Correct / Improve     null  NullPointerException


 Q1599. Can an object be assigned to multiple references ?Core Java
Ans. Yes we can assign an object to multiple references like following

String str1 = new String("Hello World");
String str2 = str1;

Now both str1 and str2 points to "Hello World" in memory.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q1600. How do we implement a weight round robin algorithm in load balancing ?Algorithm
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     load balancing  load balancer


 Q1601. Which Java features you like the most ?General
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q1602. Which Java features you dislike the most ?General
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q1603. Which features you feel are missing in Java and would have added great value if were present in the language ?General
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q1604. Do you like the features introduced with Java 8 ? Which one you like the most ?General
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q1605. What do you make out of this error

org.hibernate.exception.ConstraintViolationException: could not insert: [<Entity>]
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (<Constraint Name>) violated

and how would you go about debugging it ?
Database
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 :   

   Like         Discuss         Correct / Improve     ConstraintViolationException  SQLIntegrityConstraintViolationException


 Q1606. What is ConstraintViolationException in Hibernate ?Hibernate
Ans. The exception is thrown when a database constraint is violated.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     ConstraintViolationException


 Q1607. What are the different database constraint types ?Database
Ans. Not Null
Unique
Primary Key
Foreign Key
Check Constraint

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q1608. What is a check database constraint ?Database
Ans. Constraint specifies the values allowed in one or more columns of every row of a table.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     database constraint


 Q1609. What is a unique constraint ?Database
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 :   

   Like         Discuss         Correct / Improve     unique constraint


 Q1610. What is the relation between Primary Key, Unique and Not Null constraint ?Database
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 :   

   Like         Discuss         Correct / Improve     database constraint


 Q1611. What does 'canonical representation' in Java mean ?Core Java
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q1612. Can a constructor have a private access specifier ?Core Java
Ans. Yes, declaring a constructor private means disabling the creation of object that way using new operator.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     constructor  private constructor


 Q1613. Difference between int and short data types ?Core Java
Ans. Both holds numeric values. short is a 16-bit signed two's complement integer whereas int is a 32-bit signed two's complement integer.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     data types  short vs int


 Q1614. Does Java allows inter thread communication ?Core Java
Ans. Yes. Using wait and notify methods.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q1615. What is a gobbler class ?Core Java
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 :   

   Like         Discuss         Correct / Improve     gobbler  stream


 Q1616. What could be the Use Cases for an Elevator system ?Testing
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     use cases  testing


 Q1617. Write a Program to find the middle element of Linked List ?Data Structure
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     data structure  linked list


 Q1618. Why do we need Garbage collection ?Core Java
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 :   

   Like         Discuss         Correct / Improve     Garbage Collection  memory management     Asked in 2 Companies


 Q1619. Write a Program to merge two sorted arrays ?Data Structure
Ans. We can merge two sorted array by using quick sort algorithm

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     arrays  merge sorted arrays     Asked in 2 Companies


 Q1620. What is an optimistic locking ?Database
Ans. It's the way for synchronization wherein we can store version information in the table , so that if the same entity is updated by two transactions, the last to commit changes is informed of the conflict, and does not override the other transaction's work.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     locking  optimistic locking  Synchronization


previous 30   next 30

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: