Interview Questions and Answers for 'Accenture' | 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
Very frequently asked in phone and walk in interviews.
  Q31. What are Marker Interfaces ? Name few Java marker interfaces ?Core Java
Ans. An interface without any method declaration is called as marker interface. there are 3 in-built interfaces in JVM i.e. serializable, clonable, remote

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

   Like         Discuss         Correct / Improve     java   oops   interfaces   marker interface   serializable   clonable     Asked in 21 Companies      intermediate        frequent

Try 1 Question(s) Test


Very frequently asked. Usually difference between String,StringBuffer and StringBuilder is asked in different variations.
  Q32. Difference between StringBuffer and StringBuilder ?Core Java
Ans. StringBuffer is synchronized whereas StringBuilder is not.

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

   Like         Discuss         Correct / Improve     java   string   stringbuffer   string class   stringbuilder   synchronized   basic interview question   infosys technologies     Asked in 17 Companies      basic        frequent

Try 1 Question(s) Test


  Q33. What is reflection ?
Ans. It is the process of examining / modifying the behaviour of an object at runtime.

  Sample Code for reflection

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

   Like         Discuss         Correct / Improve     java   reflection   reflection api   ebay   mindtree     Asked in 29 Companies      basic        frequent


 Q34. Is it necessary that each try block to be followed by catch block ? Core Java
Ans. It should be followed by either catch or finally block.

  Sample Code for Retry in case of exception

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

   Like         Discuss         Correct / Improve     java   exceptions   exception handling   try   catch   finally  Oracle OCA Test     Asked in 3 Companies      basic        frequent

Try 1 Question(s) Test


Frequently asked in CTS ( Based on 2 feedback )
  Q35. What is the difference between comparable and comparator in java.util pkg?Core Java
Ans. Comparable interface is used for single sequence sorting i.e.sorting the objects based on single data member where as comparator interface is used to sort the object based on multiple data members.

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

   Like         Discuss         Correct / Improve     java   java.util   comparable   comparator   collections     Asked in 23 Companies      basic        frequent


  Q36. Advantage of Collection classes over Arrays ?Core Java
Ans. Collections are re-sizable in nature. We can increase or decrease the size as per recruitment.
Collections can hold both homogeneous and heterogeneous data's.
Every collection follows some standard data structures.
Collection provides many useful built in methods for traversing,sorting and search.

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

   Like         Discuss         Correct / Improve     java   collections   collections classes   advantages of collections over arrays   collections vs arrays   basic interview question     Asked in 6 Companies      basic        frequent


 Q37. How is Abstraction implemented in Java ?Core Java
Ans. Abstraction is provided in Java by following ways -

Coding to the ( Interfaces / Abstract Classes ) or contracts

By Encapsulating details within classes and exposing the minimal Door ( few public methods )

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

   Like         Discuss         Correct / Improve     java   oops concepts   abstraction   interfaces   abstract class   encapsulation  object oriented programming (oops)  oops concepts     Asked in 3 Companies      basic        frequent


 Q38. What are some different logging levels for log4j ?Log4j
Ans. DEBUG
ERROR
ALL
WARN
INFO
FATAL
OFF
TRACE
TRACE_INT
WARN

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

   Like         Discuss         Correct / Improve     java   log4j   log4j level   logging   error logging     Asked in 10 Companies


  Q39. Difference between jar , war and ear ?Java EE
Ans. Jar is Java Archieve i.e compressed Class or Class / Java files.

War comprises of compressed Servlet class files,JSP FIles,supporting files, GIF and HTML files.

Ear comprise of compressed Java and web module files ( was files ).

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

   Like         Discuss         Correct / Improve     java   j2ee   jar   web development   war   ear   build management   release management     Asked in 12 Companies      basic        frequent


  Q40. How are values passed in Java ? By value or reference ?Core Java
Ans. Java only provides pass by value.

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

   Like         Discuss         Correct / Improve     ebay   pass by value   pass by reference   method call   methods   functions   function call     Asked in 10 Companies      basic        frequent


  Q41. What is a self Join and give an example of a self Join ?

or

What is self Join and What is it's purpose ?
Database
Ans. When a Table Join itself , it's a Self Join. For example - we like to know the pair of department names where first dept has lesser employees than the later.

Select D1.name , D2.name from Dept D1, Dept D2 where D1.employee_count < D2.employee_count

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

   Like         Discuss         Correct / Improve     sql  joins  self join  self-join  Pair of employee names with first having lesser salary than later  Pair of department names where first dept has lesser employees than the later     Asked in 26 Companies      basic        frequent


  Q42. What is database Normalization ?Database
Ans. https://en.wikipedia.org/wiki/Database_normalization

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

   Like         Discuss         Correct / Improve     normalization  database     Asked in 35 Companies      intermediate        frequent


  Q43. What is the difference between authentication and authorization ?Authentication
Ans. Authentication is the process of verifying the identity and credentials of the user to authenticate him into the system.

whereas

Authorization is the process by which access to a segment , method or resource is determined.

Authorization is usually a step next to authentication.

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

   Like         Discuss         Correct / Improve     authentication  authorization  authentication vs authorization     Asked in 9 Companies      basic        frequent


 Q44. What is Amazon S3 ?Amazon Web Services (AWS)
Ans. 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


 Q45. How can we ensure thread safety in static method ?Core Java
Ans. By using synchronized static method or synchronized block

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

   Like         Discuss         Correct / Improve     threads  synchronization  static methods     Asked in 2 Companies      intermediate


 Q46. 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


  Q47. What are the types of authentication used in Web services ?Web Service
Ans. Encrypted User Name / Password
Encrypted Password within Cookie
Encrypted Tokens
IP
Client Certificates
Oauth

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

   Like         Discuss         Correct / Improve     authentication  security  web service     Asked in 12 Companies      basic        frequent


  Q48. What is a cookie ?Java EE
Ans. A cookie is a small piece of text stored on a user's computer by the browser for a specific domain. Commonly used for authentication, storing site preferences, and server session identification.

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

   Like         Discuss         Correct / Improve     cookie   javascript   web application   session management   browser   j2ee     Asked in 16 Companies      basic        frequent


Frequently asked.
  Q49. What is an Iterator?Core Java
Ans. Iterator is an interface that provides methods to iterate over any Collection.

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

   Like         Discuss         Correct / Improve     java   collections   iterator     Asked in 11 Companies      basic        frequent


 Q50. What are transient variables in java?Core Java
Ans. Transient variables are variable that cannot be serialized.

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

   Like         Discuss         Correct / Improve     java   serialization   transient     Asked in 15 Companies      intermediate        rare


  Q51. What is the use of HashCode in objects ?Core Java
Ans. Hashcode is used for bucketing in Hash implementations like HashMap, HashTable, HashSet etc.

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

   Like         Discuss         Correct / Improve     java   string   hashcode   hash code   string comparison  hashtable     Asked in 17 Companies      basic        frequent


 Q52. 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


 Q53. What is Criteria in Hibernate ?Hibernate
Ans. Criteria is a simplified API for retrieving entities by composing Criterion objects.

For example - session.createCriteria(Employee.class).add( Restrictions.like("name", "A%") ).list();

will return all employee objects having name starting with A.

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

   Like         Discuss         Correct / Improve     hibernate   hibernate criteria     Asked in 7 Companies      Basic        Frequent

Try 1 Question(s) Test


  Q54. Which Software Development methodology is being used in your current Job ?General
Ans. We are using Agile methodology. I attend daily stand up where the development leads takes the status of assigned stories, achievements, any bottlenecks or challenges. We follow iteration of 2 weeks.

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

   Like         Discuss         Correct / Improve     sdlc   agile methodology   software system analyst   software developer interview   development lead   project lead interview     Asked in 14 Companies        frequent


 Q55. Which of the collections allows null as the key ?

a. HashTable
b. HashMap
c. TreeMap
d. LinkedHashMap
Core Java
Ans. HashMap

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

   Like         Discuss         Correct / Improve     java   collections   map  hashtable     Asked in 2 Companies      basic        frequent


Must know at all levels. Among Top 10 frequently asked questions in Java. Very frequently asked to fresh graduates or less experienced professionals.
  Q56. What is Inheritance ?Core Java
Ans. Its a facility for code reuse and independent extension wherein a derived class inherits the properties of parent class.

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

   Like         Discuss         Correct / Improve     inheritance  object oriented programming (oops)  oops concepts  oops concepts  java concepts  code reuse  code re-use   classes  derived classes     Asked in 14 Companies      basic        frequent


Very frequently asked to fresh graduates. Frequently asked in NSEiT and Accenture India
 Q57. Write a program to Generate prime numbers till a given numberCore Java
Ans. public class Main {
public static void main(String args[]) {
int number = 2;
int count = 0;
long sum = 0;
int givenNumber = 1000;
while (count < givenNumber) {
if (isPrimeNumber(number)) {
sum = number;
count;
}
number;
}
System.out.println(sum);
}
private static boolean isPrimeNumber(int number) {
for (int i = 2; i <= number / 2; i) {
if (number % i == 0) {
return false;
}
}
return true;
}
}

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

   Like         Discuss         Correct / Improve     generate prime numbers  code  coding     Asked in 5 Companies      basic        frequent


 Q58. What are the benefits of Enums ?Core Java
Ans. Enums in Java are used to declare predefined objects and then reuse them. they offer many benefits

1. Enum instance are type safe and thread safe.

2. Enum instances are singleton and hence reused.

3. If we use Enums with Switch , It makes sure that the passed argument is either of its instance and hence provides a safeguard.

4. If we use Enum with Sorted Collections we can sort the elements with a predefined priorities ( as per constant declaration in enum )

5. We can use Enum as a Factory by defining its constructor.

6. We can store related constant data within enum. For example - If we know the values for the map upfront, we can alternatively use an enum.

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

   Like         Discuss         Correct / Improve          Asked in 6 Companies


 Q59. Difference between JDBC and Hibernate ?Database
Ans. JDBC is a standard Java Api for Database communication whereas Hibernate is an ORM framework that uses JDBC to connect with Database.

Hibernate is another layer of object table mapping over JDBC that provide a database independent, object oriented and an efficient way of database communication.

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

   Like         Discuss         Correct / Improve     JDBC  Hibernate  JDBC vs Hibernate     Asked in 3 Companies


 Q60. How to delete duplicate elements in a table ?Database
Ans. DELETE FROM TABLE WHERE ROW_NUM NOT IN ( SELECT MAX(ROW_ID) FROM TABLE GROUP BY DUPLICATE_FIELD )

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

   Like         Discuss         Correct / Improve          Asked in 3 Companies


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: