Interview Questions and Answers for 'Oracle' | 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 for 'Oracle' - 43 question(s) found - Order By Newest

next 30
Frequently asked question in companies using Hibernate.
  Q1. What is Lazy Initialization in Hibernate ?Hibernate
Ans. It's a feature to lazily initialize dependencies , relationship and associations from the Database. Any related references marked as @OneToMany or @ManyToMany are loaded lazily i.e when they are accessed and not when the parent is loaded.

  Sample Code for Lazy Initialization

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

   Like         Discuss         Correct / Improve     hibernate   lazy loading hibernate   lazy initialization hibernate   architecture     Asked in 77 Companies      Basic        frequent

Try 2 Question(s) Test


Basic and Very Frequently asked.
  Q2. What is Polymorphism in Java ?Core Java
Ans. Polymorphism means the condition of occurring in several different forms.

Polymorphism in Java is achieved in two manners

1. Static polymorphism is the polymorphic resolution identified at compile time and is achieved through function overloading whereas

2. Dynamic polymorphism is the polymorphic resolution identified at runtime and is achieved through method overriding.

  Sample Code for overloading

  Sample Code for overriding

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

   Like         Discuss         Correct / Improve     polymorphism  object oriented programming (oops)  oops concepts  oops concepts     Asked in 108 Companies      Basic        frequent

Try 2 Question(s) Test


Frequently asked in Infosys India
  Q3. What is a String Pool ?Core Java
Ans. String pool (String intern pool) is a special storage area in Java heap. When a string is created and if the string already exists in the pool, the reference of the existing string will be returned, instead of creating a new object and returning its reference.

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

   Like         Discuss         Correct / Improve     java   oops   string   string class   string pool   heap memory     Asked in 31 Companies      intermediate        frequent

Try 2 Question(s) Test


Very frequently asked. Favorite question in Walk in Drive of many Indian service companies.
  Q4. What is a final method ?Core Java
Ans. Its a method which cannot be overridden. Compiler throws an error if we try to override a method which has been declared final in the parent class.

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

   Like         Discuss         Correct / Improve     java   oops   final   final method     Asked in 30 Companies      basic        frequent

Try 1 Question(s) Test


Advanced level question frequently asked in US based companies. Recently asked in EMC and Intuit.
  Q5. Can you provide some implementation of a Dictionary having large number of words ? Solution
Ans. Simplest implementation we can have is a List wherein we can place ordered words and hence can perform Binary Search.

Other implementation with better search performance is to use HashMap with key as first character of the word and value as a LinkedList.

Further level up, we can have linked Hashmaps like ,

hashmap {
a ( key ) -> hashmap (key-aa , value (hashmap(key-aaa,value)
b ( key ) -> hashmap (key-ba , value (hashmap(key-baa,value)
....................................................................................
z( key ) -> hashmap (key-za , value (hashmap(key-zaa,value)
}

upto n levels ( where n is the average size of the word in dictionary.

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

   Like         Discuss         Correct / Improve     java   collections   hashmap   binary search   search algorithm   advanced   architecture   data structure     Asked in 6 Companies        frequent

Try 1 Question(s) Test


Frequently asked to fresh graduates.
 Q6. What is ACID ?Database
Ans. ACID stands for Atomicity, Consistency, Isolation, Durability is a set of properties of database transactions.

Atomicity means all or nothing. i.e parts of a transaction shouldn't commit if any one of them fails. Either the whole transaction should succeed or it should be complete rollback.

Consistency means that any transaction should lead database from one stabe state to another.

Isolation means that the execution of transaction results in a system state that would be obtained if transactions were executed serially.

Durability means that when a transaction is committed it forms the permanent state of database.

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

   Like         Discuss         Correct / Improve     database  acid     Asked in 7 Companies      Intermediate

Try 1 Question(s) Test


 Q7. Can we access instance variables within static methods ?Core Java
Ans. Yes.we cannot access them directly but we can access them using object reference.Static methods belong to a class and not objects whereas non static members are tied to an instance. Accessing instance variables without the instance handler would mean an ambiguity regarding which instance the method is referring to and hence its prohibited.

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

   Like         Discuss         Correct / Improve     java   oops   static   static methods   java keywords     Asked in 1 Companies


Frequently asked in high end product companies. Frequently asked in Deloitte.
  Q8. How is Hashmap internally implemented in Java ?Core Java
Ans. https://medium.com/javarevisited/internal-working-of-hashmap-in-java-97aeac3c7beb#:~:text=HashMap%20internally%20uses%20HashTable%20implementation,the%20entries%20into%20the%20map.

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

   Like         Discuss         Correct / Improve     hashmap  collections  hashmap internal implementation     Asked in 20 Companies      expert        frequent


  Q9. Difference between Vector and ArrayList ?Core Java
Ans. Vectors are synchronized whereas Array lists are not.

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

   Like         Discuss         Correct / Improve     java   basic interview question   vector   arraylist   collections   synchronization   vector vs arraylist     Asked in 35 Companies      basic        frequent


Very frequently asked in phone and walk in interviews.
  Q10. What are Marker Interfaces ? Name few Java marker interfaces ?Core Java
Ans. An interface without any method declaration is called as marker interface. there are 3 in-built interfaces in JVM i.e. serializable, clonable, remote

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

   Like         Discuss         Correct / Improve     java   oops   interfaces   marker interface   serializable   clonable     Asked in 21 Companies      intermediate        frequent

Try 1 Question(s) Test


Very frequently asked. Usually asked with questions related to String. Frequently asked at CTS / Cognizant
  Q11. What is an Immutable Object ?Core Java
Ans. Object that can't be changed after instantiation.

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

   Like         Discuss         Correct / Improve     java   oops   immutable  immutability     Asked in 27 Companies      basic        frequent

Try 2 Question(s) Test


 Q12. Is it necessary that each try block to be followed by catch block ? Core Java
Ans. It should be followed by either catch or finally block.

  Sample Code for Retry in case of exception

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

   Like         Discuss         Correct / Improve     java   exceptions   exception handling   try   catch   finally  Oracle OCA Test     Asked in 3 Companies      basic        frequent

Try 1 Question(s) Test


Frequently asked in CTS ( Based on 2 feedback )
  Q13. What is the difference between comparable and comparator in java.util pkg?Core Java
Ans. Comparable interface is used for single sequence sorting i.e.sorting the objects based on single data member where as comparator interface is used to sort the object based on multiple data members.

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

   Like         Discuss         Correct / Improve     java   java.util   comparable   comparator   collections     Asked in 23 Companies      basic        frequent


 Q14. Which of the following syntax is correct ?import static java.lang.System.*;or static import java.lang.System.*;Core Java
Ans. import static java.lang.System.*;

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

   Like         Discuss         Correct / Improve     java   static import   generics   import   OCJP   SCJP   Oracle certified java developer     Asked in 1 Companies


Very frequently asked if being interviewed for hibernate. Frequently asked in Tata Consultancy (TCS) and Overstock.com
  Q15. Difference between load and get ?Hibernate
Ans. If id doesnt exist in the DB load throws an exception whereas get returns null in that case.get makes the call to DB immediately whereas load makes the call to proxy.

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

   Like         Discuss         Correct / Improve     hibernate     Asked in 16 Companies      basic        frequent


  Q16. What is a Database Trigger ?Database
Ans. A trigger is a special kind of stored procedure that automatically gets executed upon an event in the database server.

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

   Like         Discuss         Correct / Improve     database   trigger     Asked in 10 Companies      basic        frequent


 Q17. Have you heard about the external table feature of Oracle ?Database
Ans. The external tables feature is a complement to existing SQL Loader functionality. It enables to access data in external sources as if it were in a table in the database. We have used it few times for replicating tables across different database systems.

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

   Like         Discuss         Correct / Improve     external table oracle     Asked in 1 Companies        rare


  Q18. What is a self Join and give an example of a self Join ?

or

What is self Join and What is it's purpose ?
Database
Ans. When a Table Join itself , it's a Self Join. For example - we like to know the pair of department names where first dept has lesser employees than the later.

Select D1.name , D2.name from Dept D1, Dept D2 where D1.employee_count < D2.employee_count

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

   Like         Discuss         Correct / Improve     sql  joins  self join  self-join  Pair of employee names with first having lesser salary than later  Pair of department names where first dept has lesser employees than the later     Asked in 26 Companies      basic        frequent


 Q19. What was the driving force to introduce default methods in Interfaces wef from Java 8 ?Core Java
Ans. Earlier any class implementing an interface was supposed to implement all methods declared in an interface. There was no place for optionally implementing all or subset of methods.Though we have abstract classes wherein we could have provided such a mechanism by declaring some methods as abstract while providing definition for some. But as Abstract classes have a body and are comparatively heavier than interfaces and interfaces associate closely to the concept of providing interfacing than abstract classes, Java might have though of providing optional implementation for default methods. This way same interface can be reused in variety of ways rather than making copies of an interface to suit different needs.

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

   Like         Discuss         Correct / Improve     java 8   java8  interface default methods  default methods     Asked in 6 Companies


  Q20. What is database Normalization ?Database
Ans. https://en.wikipedia.org/wiki/Database_normalization

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

   Like         Discuss         Correct / Improve     normalization  database     Asked in 35 Companies      intermediate        frequent


 Q21. What are transient variables in java?Core Java
Ans. Transient variables are variable that cannot be serialized.

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

   Like         Discuss         Correct / Improve     java   serialization   transient     Asked in 15 Companies      intermediate        rare


 Q22. How finally used under Exception Handling?Core Java
Ans. The finally keyword is used to create a block of code that follows a try block. A finally block of code always executes, whether or not an exception has occurred.

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

   Like         Discuss         Correct / Improve     java   exceptions   exception handling   try   finally   basic interview question     Asked in 1 Companies

Try 1 Question(s) Test


 Q23. What things you will look for if you get following exception while making DB call ?

table or view does not exist
Database
Ans. First will check if the table or view actually exist in the DB

If it does , Will make sure to see that the application has rights on the schema that holds the respective Table.

Will then make sure that we have prefixed the schema with the table name while accessing it.

Will then make sure that its not DB Cache that's causing it as the table DDL might have been created recently.

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

   Like         Discuss         Correct / Improve     sql   database   oracle   technical lead


 Q24. What's the benefit for specifying constraints like Not Null , Primary Key explicitly instead of specifying it against the column ?Database
Ans. In case we specify them explicitly we can have control over constraint name as otherwise they will be system generated. It provides an ease in case we plan to drop the constraint in future.

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

   Like         Discuss         Correct / Improve     sql   database   oracle


 Q25. How can we disable a constraint ?Database
Ans. alter table
table_name
DISABLE constraint
constraint_name;

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

   Like         Discuss         Correct / Improve     sql   database   oracle


 Q26. Can we have foreign key reference to a non primary key column ?Database
Ans. Yes, but the respective key in the foreign table should be declared Unique.

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

   Like         Discuss         Correct / Improve     sql   database   oracle     Asked in 2 Companies


 Q27. What should be done for auto generating primary key id in a table ?Database
Ans. We need to create a sequence.

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

   Like         Discuss         Correct / Improve     sql   database   oracle


 Q28. Which constraint cannot be specified as an explicit constraint and should be specified with the column only ?Database
Ans. NOT NULL

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

   Like         Discuss         Correct / Improve     sql   oracle   database   ddl   constraint   table creation


 Q29. How to know the structure of a Table in Oracle ?Database
Ans. DESC

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

   Like         Discuss         Correct / Improve     sql   database   oracle


 Q30. How to know the constraints on a Table in Oracle ?Database
Ans. SELECT *
FROM user_constraints
WHERE table_name = ''

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

   Like         Discuss         Correct / Improve     sql   database   oracle


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: