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. |
|
| ||||
Interview Questions and Answers for 'Zoho' - 4 question(s) found - Order By Newest | ||||
| ||||
Ans. Vectors are synchronized whereas Array lists are not. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   basic interview question   vector   arraylist   collections   synchronization   vector vs arraylist Asked in 35 Companies basic   frequent | ||||
| ||||
Ans. public void checkIfAnagram(String str1,String str2){ boolean anagram = true; for(char c:str1.toCharArray()){ if(!str2.contains(String.valueOf(c))){ System.out.println("Strings are Anagrams"); anagram = false; } if(anagram == true){ System.out.println("Strings are not Anagrams"); } } } | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   check if 2 strings are Anagrams Asked in 30 Companies basic   frequent | ||||
Frequently asked in face to face interviews. | ||||
| ||||
Ans. int count = 15; int[] fibonacci = new int[count]; fibonacci[0] = 0; fibonacci[1] = 1; for(int x=2; x < count; x++){ fibonacci[x] = fibonacci[x-1] + fibonacci[x-2]; } for(int x=0; x< count; x++){ System.out.print(fibonacci[x] + " "); } | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  ebay   fibonacci series Asked in 66 Companies basic   frequent | ||||
| ||||
Ans. public class Class{ public static void main(String[] args){ String string1 = "Hello I am Jack. I live in United States. I live in california state."; String string2 = "I live in"; int startIndex = 0; int endIndex = string1.length()-1; int countNoOfOccurences = 0; String remainingString = string1; while(startIndex < endIndex){ if(remainingString.indexOf(string2) != -1){ countNoOfOccurences++; startIndex = remainingString.indexOf(string2) + string2.length(); remainingString = remainingString.substring(startIndex); } else { break; } } System.out.println(countNoOfOccurences); } } | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  string  code  coding Asked in 2 Companies | ||||