Advanced Java

  Home  Java Programing  Advanced Java


“Advanced Java frequently Asked Questions in various Advanced Java job Interviews by interviewer. Get preparation of Advanced Java job interview”



24 Advanced Java Questions And Answers

4⟩ What we can not do in jdbc but can do hibernate?

There are many thing we can do in hinernate automaticaly by

hibernate tools or seting hibernate properties.some I

giving below:

(1) We can migrate database just change database dielect.

(2)we can used caching

(3)if user do not know ant any SQL languge then they can

use criteria query.

(4)There is one scnerio where SQL query are failed when

want fetch obejct from db but do not know there ID.

Hibernate provide this solution using HSQL.

 135 views

6⟩ Java is fully object oriented languages or not? Why?

No,java is not fully object oriented language because it does not support "multiple inheritence" and "pointers" which are used in C++.But,by using Interfaces we can implement multiple inheritence.Also,due to presence of Primitive datatypes,which are used in (AutoBoxing)...we can say it is not fully object oriented language.

 154 views

7⟩ Does Java pass arguments by value or reference?

Pass by value.

1. When passing primitives, it passes a copy of the

variable to the method. Any change made in the method does

not reflect in the calling method.

2. When dealing with objects, a copy of their

reference/address is passed. Thus the change made to the

object is reflected in the calling method.

 142 views

9⟩ Different between Struts and Spring? or Why use Spring, if you are already using Struts?

Struts:

1.Struts is only for web Applications.We can not develop any

type of Java,J2EE applications by using Struts Framework.

2.We can not Integrate other Frameworks with Any other Java

Oriented Frameworks.

Spring:

1.Spring is for developing any kind of Java,J2EE applications.

2.It is Layered architecture.We can integrate any no of

Frameworks with Spring.

3.It has So many features like AOP,IOC.

 195 views

12⟩ How will the struts know which action class to call when you submit a form?

struts-config.xml in this file.

under the tag <type> absolute path of Action class

under the tag <name> name of the action form class

Both of this will be called when the desired action

mentioned under the <path> tag will be called and

struts-config.xml will call action class mentioned in the

<type> tag and also populate the fields of form class

mentioned under <name> tag.

 144 views