Java - Interview Questions and Answers for 'Accolite' | Search Java Interview Question -

Search Java Interview Questions

 2280 questions in repository.
 There are more than 200 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 for 'Accolite' - 3 question(s) found - Order By Newest

 Q1. What are different ways to create String Object? Explain.Core Java
Ans. When we create a String using double quotes, JVM looks in the String pool to find if any other String is stored with same value. If found, it just returns the reference to that String object else it creates a new String object with given value and stores it in the String pool.

When we use new operator, JVM creates the String object but dont store it into the String Pool. We can use intern() method to store the String object into String pool or return the reference if there is already a String with equal value present in the pool.

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

   Like      Discuss      Correct / Improve     java   string class   string   jvm   memory management   string pool     GuideWire  NTT Data  Fractal Analytics  Accolite      basic        frequent

Try 3 Question(s) Test

Related Questions

  Does garbage collection guarantee that a program will not run out of memory?
  Describe what happens when an object is created in Java ?
  Describe, in general, how java's garbage collector works ?
  What are various types of Class loaders used by JVM ?
  What are strong, soft, weak and phantom references in Java ?
 Why two types of memory - stack and heap are required by Java ?
  Different types of memory used by JVM ?
  What is a class loader ? What are the different class loaders used by JVM ?
  Should we override finalize method ?

Frequently asked in all types of companies especially Indian Services companies. Frequently asked in CTS (Based on 2 feedback)
 Q2. What is the use of hashcode in Java ?Core Java
Ans. Hashcode is used for bucketing in Hash implementations like HashMap, HashTable, HashSet etc. The value received from hashcode() is used as bucket number for storing elements. This bucket number is the address of the element inside the set/map. when you do contains() then it will take the hashcode of the element, then look for the bucket where hashcode points to and if more than 1 element is found in the same bucket (multiple objects can have the same hashcode) then it uses the equals() method to evaluate if object are equal, and then decide if contain() is true or false, or decide if element could be added in the set or not.

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

   Like      Discuss      Correct / Improve     java   collections   hashcode   advanced     Cognizant (CTS)  Compro Technologies  VigLink  Proofpoint  Accolite      intermediate        frequent

Try 1 Question(s) Test

Related Questions

  Which String class does not override the equals() and hashCode() methods, inheriting them directly from class Object?
 How is hashcode calculated in java ?
 Write a class and override the equals and hashcode method ?

 Q3. How to configure Tomcat to have number of user restrictions?Server2017-12-26 09:58:12

 This question was recently asked at 'Accolite'.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     omca     Accolite

Related Questions

  Is tomcat an application or Web server ?

Subscribe to Java News and Posts. Get latest updates and posts on Java from
Enter your email address:
Delivered by FeedBurner

comments powered by Disqus

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:

X Close this

X Close this

Help Us Improve.
Please share your
interview experience.

Company Name:   

Questions Asked: