Interview Question and Answers | Search Coding Interview Questions - 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 Question and Answers - 3435 question(s) found - Order By Rating

next 30
 Q1. What would you use the span element for ?HTML
 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     


 Q2. What is Array.Map function ? What will be output of following ?

const myArray = [1, 4, 9, 16];
const result = myArray.map(x => x * 2);
Javascript
Ans. It will create an array with each value as x*2

[2, 8, 18, 32]

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

   Like         Discuss         Correct / Improve          Asked in 2 Companies


 Q3. What is systemd in Unix ?Unix
 This question was recently asked at 'Broadcom, Symantec'.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 2 Companies


 Q4. Why cannot we initialize a final field within the constructor if the initialization is within try block ?Core Java
Ans. What if the initialization throws an exception. In that case , it will let it move forward without initializing the final field. So it's a way to enforce that either the field is initialized or it fails completely.

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

   Like         Discuss         Correct / Improve     oops


 Q5. Can we initialize final fields within the constructor ? Why ?Core Java
Ans. Yes, Because final fields needs to be initialized before the construction of the object completes. Not necessarily at the time of class loading.

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

   Like         Discuss         Correct / Improve     oops


 Q6. What is cyclic instantiation ? Have you ever faced any problem due to this ?OOP
Ans. Cyclic instantiation in OOPs may happen if Class A loading results in Class B Loading , and then Class B Loading results in Class C loading and then Class C has a static reference to Class A and hence results in cyclic instantiation or loading.

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

   Like         Discuss         Correct / Improve     


 Q7. Can we have a directive that get's applied based on an attribute on a field ?Angular
Ans. Yes

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

   Like         Discuss         Correct / Improve     


 Q8. How can we add a particular styling to a field based on a condition ? Angular
Ans. We can create a directive to do that.

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

   Like         Discuss         Correct / Improve     


 Q9. What is the use of ElementRef in angular ?Angular
 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     


 Q10. What is the use of Renderer class in angular ?Angular
 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     


 Q11. What is the use of NgControl ?Angular
 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     


 Q12. Can we have multiple selectors for a directive in Angular ?Angular
Ans. Yes

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

   Like         Discuss         Correct / Improve     


 Q13. How can we add a text in front of all input fields in an application ?Angular
Ans. We can create a directive with selector as 'input' and then onInit of the directive , we can append the text to the input control html.

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

   Like         Discuss         Correct / Improve     


 Q14. Can we get the validators for a control in angular ? How ?Angular
Ans. No - https://github.com/angular/angular/issues/13461

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

   Like         Discuss         Correct / Improve     


 Q15. Will this code give any error ?

let result: string;
result = false || 'true';
Typescript
Ans. No

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

   Like         Discuss         Correct / Improve     


 Q16. Will this code give any error ?

let result: boolean | string;
result = false || 'true';
Typescript
Ans. No

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

   Like         Discuss         Correct / Improve     


 Q17. Will this code give any error ?

let result: boolean;
result = false || true;
Typescript
Ans. No

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

   Like         Discuss         Correct / Improve     


 Q18. Will the following code give any error

let result: boolean;
result = false | true;
Typescript
Ans. Yes, | is a bitwise operator and not boolean or. Use || instead

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

   Like         Discuss         Correct / Improve     


 Q19. Will the following code give any error

let result: string | number;
result = 'true';
Typescript
Ans. No

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

   Like         Discuss         Correct / Improve     


 Q20. Will the following code give any error

let result: string | number;
result = 'true';
Typescript
Ans. No

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

   Like         Discuss         Correct / Improve     


 Q21. Will the following code give any error

let result: string | number;
result = true;
Typescript
Ans. Yes, result can either be string or a number but not boolean.

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

   Like         Discuss         Correct / Improve     


 Q22. What does the following declaration mean

let result: string | number;
Typescript
Ans. It means we can assign either a string or a number to result.

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

   Like         Discuss         Correct / Improve     


 Q23. How can we specify that a particular variable may have either of the two data types in Typescript ? Typescript
Ans. Yes

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

   Like         Discuss         Correct / Improve     


 Q24. How can we specify that a particular variable may have either of the two data types in Typescript ? Typescript
Ans. let result: string | boolean;

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

   Like         Discuss         Correct / Improve     


 Q25. Can we specify that a particular variable may have either of the two data types in Typescript ? Typescript
Ans. let result: string | boolean;

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

   Like         Discuss         Correct / Improve     


 Q26. Is it safe to use session storage ?Javascript
Ans. Session storage can be accessed from XSS (Cross site Scripting) attacks but cookies (if set with "HttpOnly" and "Secure" flags) are more safer against these attacks.

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

   Like         Discuss         Correct / Improve     session storage  security


 Q27. How can you trim all strings in an array ?
Ans. array.map(s => s.trim())

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

   Like         Discuss         Correct / Improve     java   angular   typescript   javascript


 Q28. What is GIT Stash ?Git
 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     


 Q29. What is conflict in GIT ?Git
 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     


 Q30. What is staging in GIT ?Git
Ans. Before completing the commits, it can be formatted and reviewed in an intermediate area known as staging.

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

   Like         Discuss         Correct / Improve     


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: