Interview Questions and Answers - Order By Rating Q1561. what is the repository structure in svn ? SVN
This question was recently asked at 'Sri Tech'.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   Asked in 1 Companies Q1562. What are some of the Java Naming conventions ? Core Java
Ans. 1. Class name should be a noun and should start with capital case character.
2. Interface Name should be an adjective and should start with capital case character.
3. Method and Variable names should follow lower camel case notation.
4. package name should be all lower case.
5. constant variables (static final) should be all capital case. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  naming conventions basic Q1563. What is an execution engine within JVM ? Core Java
Ans. Execution engine contains interpreter and JIT compiler, which covert byte code into machine code.
Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  jvm  execution engine  compiler Asked in 1 Companies Q1564. How to create list that will sort it's elements dynamically? Algorithm
Ans. Override the behavior of collection class to sort the list upon each element addition. Though it's not recommended as list are sorting heavy data structures.
List<MyType> list = new ArrayList<MyType>() {
public boolean add(MyType mt) {
super.add(mt);
Collections.sort(list, comparator);
return true;
}
}; Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies intermediate Q1565. Is it advisable to keep session or transaction open for long time just to avoid LazyInitializationException ? Hibernate
Ans. No. It's a resource and performance overhead. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  LazyInitializationException  Lazy Loading Q1566. Do you like Native SQL Apis like JDBC or JPA / Hibernate ? Hibernate
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  JDBC vs JPA  JDBC vs Hibernate Q1567. If you are given choice to avoid LazyInitializationException using any of the following measures, which are the ones you will choose and why ?
1. Set lazy=false in the hibernate config file.
2. Set @Basic(fetch=FetchType.EAGER) at the mapping.
3. Make sure that we are accessing the dependent objects before closing the session.
4. Force initialization using Hibernate.initialize Hibernate
Ans. First resolution is a big No as it conveys no lazy loading in complete app. even second is advocating the same but for a particular mapping.
third one is most appropriate if loading and dependent entity property access is closer to each other in code and can be accomplished.
I don't mind using 4th too. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  lazy loading  lazy initialization  LazyInitializationException Q1568. What does the following exception means
org.hibernate.LazyInitializationException: could not initialize proxy - no Session Hibernate
Ans. The error states that Hibernate is not able to initialize proxy / dependent entity objects as there is no session or transaction present. Very likely we are trying to load the dependent entities lazily but the call to dependent object property is not wrapped within the session or transaction. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Lazy Loading  Lazy Initialization  org.hibernate.LazyInitializationExceptionAns. Amazon Simple Storage Service or S3 is object storage with a simple web service interface to store and retrieve any amount of data from anywhere on the web. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws  amazon s3  aws s3  aws storage  amazon cloud storage  amazon s3 Asked in 12 Companies Q1570. What are the daily activities of build and release engineer ?
This question was recently asked at 'greeteck infosolutions'.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  build and release Asked in 1 Companies Q1571. Where do you see yourself in next 5 years? General
Ans. Sample Answers -
Getting better with upcoming technologies and be a Lead developer.
In accordance with the company, working as a permenant employee.
Be an associate architect.
Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 2 Companies Q1572. What is Exception Wrapping ?
Ans. Exception wrapping is wrapping an exception object within another exception object and then throwing the outer exception. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  exception handling  exception wrapping  exceptions intermediate   rare Q1573. Name few structural Design Patterns ? Design
Ans. Adapter,Bridge,Composite,Decorator,Facade,Flyweight,Proxy Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Design Patterns  Structural Design Patterns Intermediate Q1574. Name few creational design patterns ? Design
Ans. Factory,Abstract Factory,Singleton,Prototype and Builder Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Design Pattrns  Creational Design Patterns Intermediate Q1575. What access the variable gets if we don't provide any access specifier ? Core Java
Ans. It gets the default access i.e package protected. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  access specifiers  default Access specifier Basic Q1576. Design a Passport Office system Design
This question was recently asked at 'Netcracker Technology'.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  Design Asked in 1 Companies Q1577. What is cloning in GIT ? GIT
Ans. Cloning is the process of making a copy. It could be creating local copy of another local repository or local copy of remote repository. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  GIT  Configuration Management  GIT Cloning Q1578. What is the difference between GIT Commit and Push ? GIT
Ans. Git commit commit the changes to local repository whereas Push commits the changes to Remote repository. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  GIT  Configuration Management  commit vs push Q1579. How are the concept of Association related to Composition and Inheritance ? Core Java
Ans. Composition and Inheritance are the different types of Associations for Classes.
Composition is a has-a association between classes.
Inheritance is a is-a association between classes. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  composition  object oriented programming (oops)  oops concepts  inheritance  object oriented programming (oops)  oops concepts  association  relationship between objects Q1580. What are the core OOPs concepts ? Core Java
Ans. Abstraction, Encapsulation, Polymorphism , Composition and Inheritance Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  core oops concepts Asked in 65 Companies basic   frequent Frequently asked Spring interview question. Q1581. What are the components of Spring framework ? Spring
Ans. Core: [Core, Bean, Context, Expression Language]
Web: [Web, Portlet, Servlet, etc]
Data Access [JMS, JDBC, etc]
AOP, Aspect Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  spring  spring framework components Asked in 12 Companies Q1582. What are the methods to connect to database in Java ? Database
Ans. JDBC ( Java Database Connectivity ),ODBC (Open Database Connectivity), Hibernate, JPA ( Java Persistence API ), JOOQ,MyBatis Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  database connection  jdbc  ORM  Hibernate Asked in 1 Companies Q1583. How would you do an object oriented design on animals in a zoo ? Design
This question was recently asked at 'Booking.com,InterContinental Hotels,Caissa,Workday'.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   Asked in 4 Companies Q1584. Write a method / program that will determine if the parenthesis are balanced in a given string. Core Java
Ans. https://www.geeksforgeeks.org/check-for-balanced-parentheses-in-an-expression/ Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  string  code  coding Asked in 14 Companies Q1585. Why is it important to close files and streams ? Core Java
Ans. Optimizing Resource utilization. When you open a file using any programming language , that is actually a request to operating system to access the file. When such a request is made , resources are allocated by the OS. When you gracefully close those files, those resources are set free.
In Java if you don’t close the streams and files, Garbage collection identifies the open files which have lost the reference and hence will close them. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  file handling Q1586. What is the parent child relationship in Maven ? Maven
Ans. Maven provides a facility to have a structure of inheritance relationship between modules / projects through parent tag in POM file. When we try building the parent project , all its child modules are built first in the order specified in the parent POM file. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  maven Asked in 1 Companies Q1587. What is the difference between && and & in Java ? Core Java
Ans. && is a Logical whereas & is a bitwise operator Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  operators  logical vs bitwise operator Q1588. Why don't Java objects have destructors ? Core Java
Ans. Java manages memory using built-in garbage collector Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  destructor  garbage collection Q1589. Write a Java program to print 10 random numbers between 1 to 100? Core Java
This question was recently asked at 'karya technology'.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  coding  code Asked in 1 Companies Q1590. Ho do you share / transfer variables between JSP pages ? Java EE
This question was recently asked at 'UC Davis'.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  jsp Asked in 1 Companies