InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 401. |
Explain the difference between web services, CORBA and DCOM? |
| Answer» | |
| 402. |
What is the difference between a SOA and a Web service? |
||||||
Answer»
The above QUESTION can be a game-changing Web Service Interview Question for you. You just have to go through it one more time. |
|||||||
| 403. |
What is PKI? |
|
Answer» Public Key Infrastructure or PKI is a framework of cybersecurity and encryption that protects COMMUNICATIONS between the SERVER and users. It works with two different CRYPTOGRAPHIC KEYS; a public key and a private key. |
|
| 404. |
What do you mean by BEEP? |
|
Answer» BEEP or Blocks Extensible EXCHANGE Protocol is CONNECTION ORIENTED internet protocol. SOAP messages inherit the ADDITIONAL service qualities from BEEP to maintain session context at the receiver and the sender. |
|
| 405. |
Explain the sun-jaxws.xml file? |
|
Answer» The sun-jaxws.xml FILE is present in SOAP web SERVICES and HELPS in offering the endpoints details when JAX WS web services get deployed in a servlet container. Placed in WEB-INF directory, the sun-jaxws.xml file CONTAINS implementation class, endpoint name, meta information, and a URL pattern. |
|
| 406. |
How we can maintain session in REST Services? |
| Answer» | |
| 407. |
What is REST Web Services and also explain its benefits? |
|
Answer» REpresentational State TRANSFER or REST web service is an architectural style for developing. It’s favorite due to its simplicity and fact that it builds upon existing features and SYSTEMS of HTTP in order to ACHIEVE its OBJECTIVES, as opposed to creating entirely new frameworks, technologies, and standards. |
|
| 408. |
What type of security is needed in web services? Explain |
|
Answer» Web services require the following security:
|
|
| 409. |
What do you mean by WSDL and why it is used? |
|
Answer» WSDL or Web Services DESCRIPTION Language is an XML format for describing network services as a SET of endpoints OPERATING on messages containing procedure-oriented or document-oriented information. It allows developers to exchange info over a particular protocol between applications. Continue further to access best web services INTERVIEW questions for experienced as WELL as freshers. |
|
| 410. |
Explain the advantages & disadvantages of SOAP Web Services? |
Answer» ADVANTAGES:
|
|
| 411. |
What do you mean by SOAP? |
|
Answer» Simple OBJECT Access Protocol or SOAP is a messaging protocol which allows PROGRAMS RUNNING on disparate operating systems to communicate using HTTP (Hypertext Transfer Protocol), and it's XML (Extensible Markup Language). |
|
| 412. |
List the types of Web Services. |
| Answer» | |
| 413. |
Explain the advantages of Web Services. |
|
Answer» Here are the advantages of WEB services:
|
|
| 414. |
What are the difference between JAX RPC and JAX WS? |
||||||
Answer»
This web services interview questions has always been the choice of interviewers. We suggest you go through it multiple TIMES. |
|||||||
| 415. |
What are the difference between SOAP and REST Web Services? |
|||||||||||||||
Answer»
|
||||||||||||||||
| 416. |
What is the difference between JDBC and Hibernate? |
|||||||||
Answer»
To read more Hibernate Interview Questions, and MAKE the concepts clear, you can VISIT the Best Interview Question. |
||||||||||
| 417. |
What is Hibernate mapping file? |
|
Answer» The OBJECT or relational mappings are the files which are DEFINED in an XML document which instruct HIBERNATE in mapping the defined CLASSES or class to the tables in the DATABASE. |
|
| 418. |
What is a configuration in hibernate? |
|
Answer» CONFIGURATION SETTINGS are required for the database and various other related parameters in HIBERNATE. The format for displaying such information is supplied as an XML file named hibernate.cffg.xml and hibernate.PROPERTIES know as standard Java properties file. |
|
| 419. |
What is the default annotation for a property in hibernate? |
|
Answer» The DEFAULT annotation for a property in the Java FRAMEWORK is a @ld annotation, where Hibernate ASSUMES that the annotation is on the object’s access properties and detects that it is on the field. Placing the annotation @ld on getId() method GIVES access to the features through getter and SETTER methods and that too by default. |
|
| 420. |
How to Implement Database Relationship in Hibernate? |
| Answer» | |
| 421. |
Why do we need transactions in hibernate? |
|
Answer» Transactions are required for protecting and maintaining the DATA and their consistency in HIBERNATE. JAVA application PROGRAM framework, can modify several things in the databases, but transactions are needed for retaining the DATABASE and for this, there is an availability of Transaction Interface. |
|
| 422. |
What are the main differences between persistent and transient objects? |
|||||||||
Answer»
|
||||||||||
| 423. |
What are the states of the object in hibernate? |
Answer» HIBERNATE OBJECT STATES are as follows-
|
|
| 424. |
Why is Hibernate called ORM? |
|
Answer» Hibernate offers retrieval facilities and data query services along with GENERATING SQL calls and relaxing the developer from HANDLING the PROJECT manually and conversion of the object of the set of the RESULT. These are the reasons which make Hibernate an object-relational model for the mapping tool for Java language. |
|
| 425. |
List some of the database support by hibernate? |
|
Answer» Hibernate use SQL DATABASES for REGULARLY testing by regularly handling in the Hibernate product LIFECYCLE or Hibernate developers: |
|
| 426. |
Explain the difference between criteria and criterion in hibernate? |
|||||||||
|
Answer» 14. What is the difference between SessionFactory and SESSION in hibernate?
|
||||||||||
| 427. |
What are the steps of calling a stored procedure in hibernate? |
|
Answer» Write the FOLLOWING queries- 1. Use CreateNativeSQL Method for calling a PROCEDURE
2. Use @NamedNativeQueries to call a STORED procedure 3. Use @NamedStoreProcedureQuery to call a stored procedure ExampleUse @NamedNativeQueries to call a stored procedure @NamedNativeQueries({ @NamedNativeQuery( name = "callGetAllFoos", query = "CALL GetAllFoos()", resultClass = Foo.class) }) @Entity public class Foo implements Serializable { // Model definition } Use @NamedStoreProcedureQuery to call a stored procedure @NamedStoredProcedureQuery( name="GetAllFoos", procedureName="GetAllFoos", resultClasses = { Foo.class } ) @Entity public class Foo implements Serializable { // Model Definition } |
|
| 428. |
What is the difference between hibernate save () saveOrUpdate () and persist () methods? |
|||||||||
Answer»
|
||||||||||
| 429. |
Why is SessionFactory used in hibernate? |
|
Answer» Session Factory is used to configure objects which is further responsible for allowing instantiation of the Session object and TURNING the configuration HIBERNATION for SUPPLIED configuration file application. THREADS of an application use SESSIONFACTORY in Hibernation. |
|
| 430. |
What is Hibernate session factory? |
|
Answer» Hibernate SessionFactory is an interface, and it is created with the HELP of Configuration object. It consists of all the database related property details and in this, either hibernate.properties, the hibernate.cfg.xml file is USED for pulling it. In the case of the increased NUMBER of multiple databases, then the REQUIREMENT of creating one SessionFactory PER database. |
|
| 431. |
What is the use of evicting method in hibernate? |
|
Answer» The EVICT method is USED for detaching the object from hibernate provides evict () method and session cache. After this process, there is no persistence in the CHANGE of the object. The detachment of the associated objects can ALSO take place with the mapping associated with the CASCADE=” evict.” |
|
| 432. |
What is the difference between save and merge in hibernate? |
| Answer» | |
| 433. |
What is flush in hibernate? |
|
Answer» The PROCEDURE of synchronizing the persistence context state with the database is known as flushing. There are a set of methods sent by Hibernate Session and ENTITYMANAGER with the help of which the persistence state of an entity can be CHANGED by the APPLICATION developer. |
|
| 434. |
What is transaction commit in hibernate? |
| Answer» | |
| 435. |
How many types of transaction are there in hibernate? |
|
Answer» There are four TRANSACTIONS in Hibernate ORM, and these are Atomicity, Consistency, ISOLATION, and DURABILITY. Acronym used is ACID. These are the PROPERTIES which every transaction follows. |
|
| 436. |
What is the Java Persistence API used for? |
|
Answer» Java API or known as JPA is an INTERFACE SPECIFICATION of Java application program. It is USED to describes the relational DATA’s management in the Java-based applications ALONG with Enterprise Edition and Java platform. |
|
| 437. |
What is the benefit of using hibernate? |
| Answer» | |
| 438. |
What is hibernate and why it is used? |
|
Answer» It is an ORM DEVELOPED for mapping tool for Java APPLICATION program. It has been used in the development of Java application program as the primary function of Hibernate ORM is mapping the classes to the database TABLES and the types of Java data to SQL data types. Other uses are-
|
|
| 439. |
What do you mean by Ordered and Sorted in collections in Java? |
|
Answer» In an ordered collection, the elements have a specific order, which is independent of the value. For EXAMPLE a List. In the SORTED collection, the collection has an order, and the order depends on the value of the ELEMENT. For example a SortedSet. Developers should know everything about core java programs before their NEXT interview. |
|
| 440. |
What are different access specifiers in Java? Explain |
|
Answer» Java Access Specifiers REGULATE access to field, CLASS, and method. Also CALLED as visibility specifiers, they determine if a method or field can be used by another method in some other class. An important part of OOP, they are also used to RESTRICT access. There are four types of Access Specifiers:
|
|
| 441. |
What is the difference between String, String Builder, and Buffer? |
||||||||||||||||
Answer»
|
|||||||||||||||||
| 442. |
What is Encapsulation in Java? Explain |
|
Answer» Encapsulation is one of the FOUR OOP concepts. It is a way of wrapping variables and code on data as a SINGLE unit. The class variables are HIDDEN from other classes, and can be accessed only through their current class. Therefore, this method is also called data hiding. |
|
| 443. |
What do you mean by composition in java? |
|
Answer» It is the DESIGN technique for implementing has-a relationship in a class. You can USE java INHERITANCE or Object composition for reusing the code. You can achieve Java composition by using instance VARIABLES that are referring to other objects. |
|
| 444. |
What do you mean by ternary operator in java? |
|
Answer» It is the only conditional operator that can take THREE OPERANDS and assists in EVALUATING Boolean expressions. It is a replacement for if-then-else statement and is USED a lot to replace the SWITCH. Its goal s to decide what value should the variable be assigned. |
|
| 445. |
Why we used break and continue statement in Java? |
|
Answer» When the break statement is inside a loop, the loop gets terminated and the program resumes at the next statement after the loop. The CONTINUE statement can be USED in the loop CONTROL structure. It causes the loop to jump to the next ITERATION. |
|
| 446. |
Java is Pass by Value or Pass by Reference? Explain |
|
Answer» JAVA is pass by value because variables are references and their value is passed to the methods. This question was asked in a LOT of latest core java interview QUESTIONS. |
|
| 447. |
How we can run a JAR file through command prompt in Java? |
| Answer» | |
| 448. |
Explain Serialization and Deserialization in Java? |
|
Answer» The process of converting an object into BYTE sequence that can be persisted to a disk or can be sent through streams is CALLED SERIALIZATION. The reverse process of Serialization, i.e. creating objects from a sequence of bytes is called deserialization. |
|
| 449. |
What do you mean by Garbage Collection used in Java? |
|
Answer» It is the process through which JAVA programs perform MEMORY management. When the Java programs run on JVM, objects get created in a part of the memory that is dedicated to program. When objects are no LONGER needed, the garbage collector finds and DELETES them to free up program memory. |
|
| 450. |
What do you mean by default constructor in Java? |
|
Answer» Java will automatically create default CONSTRUCTORS if there are no default constructors written by you. The default CONSTRUCTOR will call parent default constructor and INITIALIZE member DATA variable to default VALUES. |
|