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

Search Interview Questions


 3268 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

   



Hitachi


   




Interview Questions and Answers for 'Hitachi' - 6 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     Asked in 27 Companies      basic        frequent

Try 3 Question(s) Test


  Q2. Write a method to check if input String is Palindrome?Core Java
Admin
info@buggybread.com
Ans. private static boolean isPalindrome(String str) {

if (str == null)
return false;

StringBuilder strBuilder = new StringBuilder(str);

strBuilder.reverse();

return strBuilder.toString().equals(str);

}

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

   Like         Discuss         Correct / Improve     java   string   stringbuilder   stringbuilder   string class   code   palindrome     Asked in 37 Companies      Basic        frequent


 Q3. What is a Webdriver ?Testing2017-02-02 08:25:41

Ans. Selenium WebDriver is a tool for automating web application testing.It helps in replicating the manual tester behavior like keyboard entry, mouse events etc and then matching the output against the expected.

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

   Like         Discuss         Correct / Improve     selenium  webdriver     Asked in 37 Companies


 Q4. Find all files from a directory (including sub directories ) that could contain dates in a specific format.Unix2018-07-27 13:32:39

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


 Q5. Are you willing to spend long hours ?General2018-07-27 13:33:28

Ans. why not if getting money in dollars!

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

   Like         Discuss         Correct / Improve          Asked in 2 Companies


 Q6. In what terms Java is better language than c and c++ ?2018-07-27 13:35:01

Ans. Java manages pointers intrinsically and gives no control over pointer arithmetic to coders and hence saves the applications from many possible problems like dangling pointers and memory leaks.

Java is platform independent and hence any application can be run on any hardware with the suitable JVM without building it separately for different hardwares.

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

   Like         Discuss         Correct / Improve          Asked in 1 Companies




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