Interview Questions and Answers for 'Shopify' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com
Share

Search Interview Questions


 3154 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 'Shopify' - 2 question(s) found - Order By Newest

Very frequently asked in different variations. Frequently asked in Deloitte ( 2 feedback ) , HCL Tech ( 3 feedback ) and Coginizant (CTS)
  Q1. Explain the scenerios to choose between String , StringBuilder and StringBuffer ?

or

What is the difference between String , StringBuilder and StringBuffer ?
Core Java
Anonymous
Ans. If the Object value will not change, use String Class because a String object is immutable.

If the Object value can change and will only be modified from a single thread, use StringBuilder because StringBuilder is unsynchronized(means faster).

If the Object value may change, and can be modified by multiple threads, use a StringBuffer because StringBuffer is thread safe(synchronized).

  Sample Code for String

  Sample Code for StringBuffer

  Sample Code for StringBuilder

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


   Like      Discuss      Correct / Improve     java   string class   string   stringbuilder   stringbuffer     Cognizant (CTS)   San Jose State University (SJSU)  HCL Technologies   Deloitte  Sophos  Hitachi  JPMorgan Chase  IBM  Kony Labs  Keystone  ebay  TIAA Financial Services  Ancestry   Rakuten  Accenture  Accenture India  QualiTest Group  CDK Global  InfoGain  Mindfire Solutions  Shopify  Tk20  AppKnox  RedMane Technology  Fidelity  travelex      basic        frequent

Try 3 Question(s) Test


Related Questions

  Difference between == and .equals() ?
  Why is String immutable in Java ?
  What are different ways to create String Object? Explain.
  Why Char array is preferred over String for storing password?
  What is a String Pool ?
 How does making string as immutable helps with securing information ? How does String Pool pose a security threat ?
 How is string object immutable if we can concat a string to it ?
  What is StringJoiner ?
 Which of the following is false about main method ?

a. It should be declared public and static
b. it should have only 1 argument of type String array
c. We can override main method
d. We can overload main method


  Q2. What is JSON ?Json
Anonymous
Ans. JSON is "JavaScript Object Notation", primarily used for client-server or server-server communication. Its a much lighter and readable alternative to XML. JSON is language independent and is easily parse-able in all programming languages.

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

   Like      Discuss      Correct / Improve     json   markup language   client server communication     Primer AI  Percolate  Cerner  HCL Technologies  Mphasis  L&T Infotech  Patni  Ticketmaster  CourseKit  Arcadia Data  Plaid  Innominds Software  Shopify  Comcast  Icertis  KrazyBee  Sportz Interactive  FusionCharts  GoPlayr  CloudCover  Totango  Konrad Group  Azure Knowledge  Platterz  Amdocs      basic        frequent

Try 2 Question(s) Test


Related Questions

  What are the benefits of JSON over XML ?
  Difference between SAX and DOM Parser ?
  Which function is used to convert a JSON text into an object ?
  Which data types are supported by JSON ?
  What is XML ?
  What is DTD ?
  What is XSD ?
  What is JAXB ?
  Which markup languages can be used in restful web services ?




Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
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: