Interview Questions and Answers for 'ORM' | 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
 Q31. What is abstraction ?Design
Ans. Abstraction is a process of hiding the implementation details and describing only the functionality to the user.

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

   Like         Discuss         Correct / Improve     bstraction  oops concepts  oops principle     Asked in 22 Companies


 Q32. What are the reasons to choose between reserved and on demand instances ?Server
Ans. In terms of compute options and configurations, Reserved Instances and On Demand instances are the same. The only difference between the two is that a Reserved Instance is one you rent (reserved) for a fixed duration, and in return you receive a discount on the base price of an On Demand instance.

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

   Like         Discuss         Correct / Improve     aws  aws ec2  aws computing  amazon cloud computing  amazon ec2  production support  Google Cloud Platform (GCP)


 Q33. Is Google App Engine , IAAS, PAAS or SAAS ?Google Cloud Platform (GCP)
Ans. It's PAAS ( Platform as a service )

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

   Like         Discuss         Correct / Improve     Google App Engine


 Q34. What is concurrent interface ?Core Java
Ans. ConcurrentMap is an interface and it is a member of the Java Collections Framework. It represents a Map that is capable of handling concurrent access to it without affecting the consistency of entries in a map. ConcurrentMap interface present in java.util.concurrent package.

HashMap operations are not synchronized, while Hashtable provides synchronization. Though Hashtable is thread-safe, it is not very efficient. To solve this issue, the Java Collections Framework introduced ConcurrentMap in Java 1.5.

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

   Like         Discuss         Correct / Improve     Concurrent Interface   java.util.concurrent   Java 8 Concurrency   java concurrency   java 8     Asked in 1 Companies


 Q35. What are system integrators in Cloud Computing?Cloud Computing
 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     Amazon Web Services (AWS)   Google Cloud Platform (GCP)


Very frequently asked. Usually asked in this format or as difference with interfaces / concrete classes.
  Q36. What is an abstract class ?Core Java
Ans. Abstract class is the class that is not supposed to be instantiated. The purpose of the class to only have extension to the derived class.

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

   Like         Discuss         Correct / Improve     abstract class     Asked in 6 Companies      basic        frequent


 Q37. What are the phases of the JSP life cycle ?Java EE
Ans. Translation of JSP PageCompilation of JSP PageClassloading (class file is loaded by the classloader)Instantiation (Object of the Generated Servlet is created).Initialization ( jspInit() method is invoked by the container).Reqeust processing ( _jspService() method is invoked by the container).Destroy ( jspDestroy() method is invoked by the container).

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

   Like         Discuss         Correct / Improve     j2ee   servlets   servelets   web application   jsp   jsp life cycle   mindtree     Asked in 9 Companies


 Q38. What are the platforms supported by Java Programming Language?Core Java
Ans. Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX/Linux like HP-Unix, Sun Solaris, Redhat Linux, Ubuntu, CentOS, etc

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

   Like         Discuss         Correct / Improve     java   jvm   platforms


 Q39. Difference between Abstraction and Implementation hiding ?
Ans. Implementation Hiding is a broader concept. Abstraction is a way of implementation hiding in OOP's.

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

   Like         Discuss         Correct / Improve     java   oops   oops concepts   abstraction   hiding information   build management


 Q40. What is Java bytecode ?
Ans. Java bytecode is the instruction set of the Java virtual machine. Each bytecode is composed by one, or two bytes that represent the instruction, along with zero or more bytes for passing parameters.

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

   Like         Discuss         Correct / Improve     java   jvm   interpreter   platform independent     Asked in 1 Companies


 Q41. Is JVM a overhead ?
Ans. Yes and No. JVM is an extra layer that translates Byte Code into Machine Code. So Comparing to languages like C, Java provides an additional layer of translating the Source Code.

C++ Compiler - Source Code --> Machine Code
Java Compiler - Source Code --> Byte Code , JVM - Byte Code --> Machine Code

Though it looks like an overhead but this additional translation allows Java to run Apps on all platforms as JVM provides the translation to the Machine code as per the underlying Operating System.


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

   Like         Discuss         Correct / Improve     java   jvm   interpreter   platform independent   yes-no   advanced   architecture


 Q42. What is Byte Code ? Why Java's intermediary Code is called Byte Code ?
Ans. Bytecode is a highly optimized set of instructions designed to be executed by the Java run-time system. Its called Byte Code because each instruction is of 1-2 bytes.

Sample instructions in Byte Code -

1: istore_1
2: iload_1
3: sipush 1000
6: if_icmpge 44
9: iconst_2
10: istore_2

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

   Like         Discuss         Correct / Improve     java   jvm   interpreter   platform independent   byte code


 Q43. Which of the following code is correct ?

a. DateFormat df = DateFormat.getInstance();
b. DateFormat df = DateFormat.getDateInstance();
c. DateFormat df = DateFormat.getInstance(DateFormat.FULL);
d. DateFormat df = DateFormat.getDateInstance(DateFormat.FULL);
Core Java
Ans. All except c are correct.

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

   Like         Discuss         Correct / Improve     java   date   dateformat


 Q44. What is the use of parse method in DateFormat ?
Ans. It is used to parse String to get the Date Object with initialized date.

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

   Like         Discuss         Correct / Improve     java   date   dateformat


 Q45. Which of the following is not a valid NumberFormat initialization ?

a. NumberFormat.getInstance()
b. NumberFormat.getDateInstance()
c. NumberFormat.getCurrencyInstance()
d. NumberFormat.getNumberInstance()
Core Java
Ans. b i.e NumberFormat.getDateInstance()

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

   Like         Discuss         Correct / Improve     java   java.util.numberformat


 Q46. Which of the following code is correct ?

a. Date date = DateFormat.newInstance(DateFormat.LONG, Locale.US).parse(str);

b. Date date = DateFormat.newInstance(DateFormat.LONG, Locale.US).format(str);

c. Date date = DateFormat.getDateInstance(DateFormat.LONG, Locale.US).parse(str);
Core Java
Ans. c

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

   Like         Discuss         Correct / Improve     java   java.util   date   dateformat


 Q47. What are the the methods to clear cache in Hibernate ?Hibernate
Ans. Evict() and clear(). Evist is used to clear a particular object from the cache whereas clear clears the complete local cache.

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

   Like         Discuss         Correct / Improve     hibernate   orm   hibernate cache


 Q48. What are different types of second level cache ?Hibernate
Ans. 1. EHCache ( Easy Hibernate )
2. OSCache ( Open Symphony )
3. Swarm Cache ( JBoss )
4. Tree Cache ( JBoss )

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

   Like         Discuss         Correct / Improve     hibernate   orm   hibernate cache   technical lead     Asked in 7 Companies


 Q49. Can we disable first level cache ? What should one do if we don't want an object to be cached ?Hibernate
Ans. No.We can either call evict after the object retrieval or can use separate sessions.

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

   Like         Discuss         Correct / Improve     hibernate   orm   hibernate cache   architecture


 Q50. What is Hibernate ?Hibernate
Ans. Hibernate is a Java ORM Framework.

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

   Like         Discuss         Correct / Improve     hibernate   orm   frameworks   architecture


 Q51. What are the different types of inheritance in Hibernate ?Hibernate
Ans. Table Per Class , Table per Sub Class , Table per Concrete Class

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

   Like         Discuss         Correct / Improve     hibernate   orm   inheritance hibernate     Asked in 1 Companies      Basic        frequent


 Q52. Which class elements are not persisted ?Hibernate
Ans. Static and Transient.

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

   Like         Discuss         Correct / Improve     hibernate   orm


 Q53. What will the following code do ?

String dateStr = "2011 11 19";
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
Date date = dateFormat.parse(dateStr);
System.out.println(date);

Ans. It will throw the ParseException as the date format doesn't abide with the format of the specified date.

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

   Like         Discuss         Correct / Improve     date   utility classes   dateformat   exception   parseexception


 Q54. What is the difference between JPA and Hibernate ?Hibernate
Ans. JPA or Java Persistence API is a standard specification for ORM implementations whereas Hibernate is the actual ORM implementation or framework.

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

   Like         Discuss         Correct / Improve     jpa   hibernate   orm   architecture   technologies     Asked in 2 Companies


 Q55. What is the advantage of JPA ?Database
Ans. Its a specification that guides the implementation of ORM frameworks. Implementations abiding by the specification would mean that one can be replaced with other in an application without much hassle. Only the Features that are added over the specification needs to be taken care of if any such change is made.

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

   Like         Discuss         Correct / Improve     jpa   hibernate   orm   technologies


 Q56. Which is the default Input Formats defined in Hadoop ?

a. SequenceFileInputFormat
b. ByteInputFormat
c. KeyValueInputFormat
d. TextInputFormat
Ans. TextInputFormat

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

   Like         Discuss         Correct / Improve     hadoop   hadoop input format


 Q57. Which of the following is not an input format in Hadoop ?

a. TextInputFormat
b. ByteInputFormat
c. SequenceFileInputFormat
d. KeyValueInputFormat
Ans. ByteInputFormat

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

   Like         Discuss         Correct / Improve     hadoop   hadoop input format


Frequently asked in face to face interviews.
  Q58. Write a program to print fibonacci series.Core Java
Ans. int count = 15;
int[] fibonacci = new int[count];
fibonacci[0] = 0;
fibonacci[1] = 1;
for(int x=2; x < count; x++){
fibonacci[x] = fibonacci[x-1] + fibonacci[x-2];
}

for(int x=0; x< count; x++){
System.out.print(fibonacci[x] + " ");
}

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

   Like         Discuss         Correct / Improve     ebay   fibonacci series     Asked in 66 Companies      basic        frequent


 Q59. What is the difference between following time formats ?

hh:mm:ss
HH:mm:ss
kk:mm:ss
KK:mm:ss
Core Java
Ans. hh= hours in 1-12 format
HH= hours in 0-23 format
kk = Hours in 1-24 format
KK= hours in 0-11 format

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

   Like         Discuss         Correct / Improve     Date  Date Time Format  Date Time


Frequently asked to Fresh graduates.
 Q60. Write a program to implement Binary search ?Core Java
Ans. http://algs4.cs.princeton.edu/11model/BinarySearch.java.html

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

   Like         Discuss         Correct / Improve     binary search  search     Asked in 5 Companies      basic        frequent

Try 1 Question(s) Test


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: