Tuesday, July 4, 2017

Write a java program to find missing number in an array in java?


This tutorial explains how to find missing number in an array in java with help of an example in eclipse editor.

Sunday, July 2, 2017

Write a java program to find the second largest number in array in java?

This program is one of the frequently asked program in java interviews.This tutorial explains how to find second largest number in array in java given with set of numbers.



Monday, June 26, 2017

Explain equals() and hashCode() contract with example?


This video tutorial explains how equals() and hashmethod() works in java and explains what is equals() and hashCode() contract and when to override equals() and hashCode() method in java?

Sunday, June 25, 2017

Garbage Collection Process with animation

This tutorial explain garbage collection process with help of animation.This tutorial starts with how garbage collection process works before java and in other programming languages and it explains how garbage collection process works in java.It also explains how garbage collection works internally and importace of out of memory error in java.

Saturday, June 24, 2017

Write a java program to print numbers from 1 to 10 without using loops

This tutorial explains how to print numbers from 1 to 10 without using loops.This video contains source code explained in Eclipse.



Explain object class and methods of Object class?

This tutorial explains about java.lang package and important classes in java.lang package such String class,String Buffer class,object class,Wrapper classes.



Saturday, June 17, 2017

Top Hibernate interview questions and answer part 1



1) What are the problems of jdbc?

   a) we must manually handle database connections. There is always risk with connection leakage.

   b) We have to write many lines of code if we have more number of fields in inserts, updates.
       When we perform object persistence, we need to copy the properties of object to paramets in               prepared statement.

   c) The code cannot be portable to other databases.The sql statements written for one database                   cannot be portable to other database.

   d) We must manually handle associations. When you perform object retrieval, you have to perform         a table join or read from several tables to get an object graph. When you perform object                       persistence, you must update several tables accordingly.


2) What is ORM? Explain its benefits and drawbacks?

       Object/relational mapping is the automated (and transparent) persistence of objects in a Java                application to the tables in a relational database,using metadata.

  The metadata describes the mapping  between the objects and the database.Using ORM, the                  application interacts with the ORM APIs and the domain model classes and is 
  abstracted from the underlying SQL/JDBC.

      Here are some of the benefits of ORM framework:
      Productivity:
      ORM reduces the development time as it eliminates the most of work.

        Maintainability:
        Because much of the work is done through configuration, your code has fewer lines and thus               requires less maintenance

       Vendor Independent :An ORM abstracts your application away from the underlying SQL                      database and  SQL dialect.ORM gives portability to support multiple databases.

       Reduce Complexity :
       ORM relieves the job of developer 95 percent of object persistence work, such as writing                     complex SQL statements with many table joins and 
        copying values from JDBC result sets to objects or graphs of objects.

 Here are the drawbacks of ORM framework :
      a) Slow Performance : For batch updates performance is slower.
      b) Overhead : For simple applications with basic curd operations that use single database it                       becomes extra overhead for them.
      c) Learning : Developer has to learn a new framework.

Friday, June 16, 2017

Top 50 hibernate interview questions for freshers and experienced


1) Explain how jdbc works?

2) Explain ORM and its features?

3) Explain benefits of ORM over jdbc?

4) Name some of the ORM frameworks based on java?

5) What is hibernate?

Tuesday, June 13, 2017

Top 25 OOPS Conceps Interview questions in java?


1) Explain OOPS conceps and its benefits?

2) Difference between Procedural Programming and OOPS?

3) What is Abstraction?

4) What is Encapsulation?

5) Difference between Abstraction and Encapsulation?

Popular Posts