Interview Questions and Answers for 'Script' | 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

   



Interview Questions and Answers for 'Script' - 37 question(s) found - Order By Newest

Very frequently asked. Among first few questions in almost all interviews. Among Top 5 frequently asked questions. Frequently asked in Indian service companies (HCL,TCS,Infosys,Capgemini etc based on multiple feedback )
  Q1. Difference between == and .equals() ?Core Java
Anonymous
Ans. "equals" is the method of object class which is supposed to be overridden to check object equality, whereas "==" operator evaluate to see if the object handlers on the left and right are pointing to the same object in memory.

x.equals(y) means the references x and y are holding objects that are equal. x==y means that the references x and y have same object.

Sample code:

String x = new String("str");
String y = new String("str");

System.out.println(x == y); // prints false
System.out.println(x.equals(y)); // prints true

  Sample Code for equals

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


   Like         Discuss         Correct / Improve     java   string comparison   string   object class   ==    equals   object equality  operator     Asked in 289 Companies      basic        frequent

Try 6 Question(s) Test


Frequently asked. Among first few questions in the J2EE segment of interview.
  Q2. What is deployment descriptor ?

or

What is the use of deployment descriptor ?
Java EE2016-06-04 22:46:40

Ans. Deployment Descriptor which is usually web.xml is used to specify the classes, resources and configuration of the application and how the web server uses them to serve web requests.This file is usually added to WEB-INF folder and contains following

* Servlet entries and url mapping
* Plugins
* Some info regarding authentication / filters
* Landing Page
* Event Handlers

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

   Like         Discuss         Correct / Improve     web.xml   servlets  deployment descriptor     Asked in 15 Companies      basic        frequent

Try 1 Question(s) Test


  Q3. What is a cookie ?Java EE
admin
info@buggybread.com
Ans. A cookie is a small piece of text stored on a user's computer by the browser for a specific domain. Commonly used for authentication, storing site preferences, and server session identification.

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

   Like         Discuss         Correct / Improve     cookie   javascript   web application   session management   browser   j2ee     Asked in 16 Companies      basic        frequent


 Q4. Difference between the jsp scriptlet tag and jsp declaration tag?Java EE
Anonymous
Ans. The jsp scriptlet tag can only declare variables not methods whereas jsp declaration tag can declare variables as well as methods.

The declaration of scriptlet tag is placed inside the _jspService() method whereas The declaration of jsp declaration tag is placed outside the _jspService() method.

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

   Like         Discuss         Correct / Improve     j2ee   jsp   scriptlet tag   declaraation tag   web application


 Q5. Have you created any build script yourself ?
Admin
info@buggybread.com
Ans. Yes, I have worked on many build scripts in last few years.

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

   Like         Discuss         Correct / Improve     build management   build technologies   build scripts


 Q6. Which of the following is fastest to locate the DOM element ?

a. document.getElementById
b. document.getElementByName
c. document.ElementName.SubElementName
d. They all result in similar performance in retrieving the DOM element.
Anonymous
Ans. document.ElementName.SubElementName

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

   Like         Discuss         Correct / Improve     html   dom   javascript


 Q7. Why should we have Javascript method definitions within HTML Head section ?

a. Its safe to have javascript code within head section
b. Head section gets loaded even if there is any error in loading HTML page
c. Head section gets executed first and hence assure that js method definition will be loaded before they are called
d. So that we can have method definition and method call at the same place
Anonymous
Ans. Head section gets executed first and hence assure that js method definition will be loaded before they are called

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

   Like         Discuss         Correct / Improve     html   head section   javascript


 Q8. What are JSP Scriptlets?

Ans. Scriptlet allow to write Java code inside JSP like following

<% Java Code %>

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

   Like         Discuss         Correct / Improve     jsp  jsp scriptlet  scriptlet


 Q9. Is there any relationship between Web.xml and Spring.xml ?Spring2017-01-11 09:13:48

Ans. No, there is no relationship between web.xml and spring.xml but you have to configure spring.xml in web.xml in order initialize beans when application starts up

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

   Like         Discuss         Correct / Improve     spring  web.xml  spring.xml  deployment descriptor     Asked in 1 Companies


 Q10. What is the difference between filter and filter-mappings xml tag within deployment descriptor ?Java EE2017-01-19 11:36:25

Ans. filter tag speficies the filter name and respective class for handling filter action whereas filter mapping maps the filter to the url patterns ( specifying the url that needs to be intercepted )

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

   Like         Discuss         Correct / Improve     deployment descriptor  web.xml  filters  filter mapping


 Q11. How to enable Cross Site scripting protection in WCS ?IBM WCS2017-02-02 14:45:43

Ans. By specifying XSiteScriptingProtection within wc-server.xml. Prohibited characters and attributes are specified within XSiteScriptingProtection to protect the application from any XSS attach.

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

   Like         Discuss         Correct / Improve     Cross site scripting  XSS attack  XSS  XSiteScriptingProtection  wc-server.xml


 Q12. What is event bubbling ?JavaScript2017-05-20 15:30:41

Ans. LinkedIn

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

   Like         Discuss         Correct / Improve     event bubbling  events     Asked in 1 Companies


 Q13. What is event handling ? What is event propagation ?JavaScript2017-05-20 15:32:05

Ans. LinkedIn

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

   Like         Discuss         Correct / Improve     event habdling  event propagation  events     Asked in 1 Companies


 Q14. What are falsy attributes in javascript ?Javascript2017-10-18 13:17:57

 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     


 Q15. Difference between Scriptlet and JSTL.Javascript2017-10-22 14:59:35

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


 Q16. How would you choose your favorite company name for e.g. three companies are given in radio buttons Infosys, TCS and Aricent. Do You need to loop trough all radio buttons and select your favorite company or can just get the selected value.Javascript2018-04-15 16:14:08

 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     


 Q17. what is event handler script ?JavaScript2018-06-06 08:39:59

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


 Q18. How can java script access a database ?JavaScript2018-06-06 08:40:29

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


 Q19. Which statement is used to exit a function in java script ?JavaScript2018-06-06 08:40:55

Ans. return

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

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q20. What is the difference between Java OR operator and Java script OR operator ?JavaScript2018-06-26 19:18:03

 This question was recently asked at '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 1 Companies


 Q21. How do you debug Javascript code ?JavaScript2018-06-26 19:20:13

Ans. Possible Answer - I use either Firebug or Chrome Developer tool.

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

   Like         Discuss         Correct / Improve          Asked in 1 Companies


  Q22. Difference between == and === ?JavaScript2018-07-04 16:16:18

Ans. == compares values === is used in scripting languages for comparing two values as well as there data tpe. like in js,php.

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

   Like         Discuss         Correct / Improve     ==  ===  == vs ===     Asked in 13 Companies      basic        frequent


 Q23. Difference between Let and Var ?TypeScript2018-10-15 11:48:19

Ans. Let creates a variable with a local scope whereas var creates it with a global scope.

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

   Like         Discuss         Correct / Improve     


 Q24. What are the different data types in typescript ?TypeScript2018-10-15 11:48:51

 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     


 Q25. Difference between interface and type ?TypeScript2018-10-15 11:50:19

 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     


 Q26. Difference between interface and class in typescript ?TypeScript2018-10-15 11:50:39

 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     


 Q27. Why type has been deprecated and replaced by interfaces ?TypeScript2018-10-15 11:51:05

 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     


 Q28. Can we set specific return type of a method in typescript ?TypeScript2018-10-15 11:51:24

 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 the use of map method in typescript ?TypeScript2018-10-15 11:51:41

 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 type script ? What are the advantages of typescript ? How is it different than javascript ?TypeScript2018-10-15 11:52:15

 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     Typescript vs Javascript


 Q31. What are the features of TypeScript ?TypeScript2018-10-15 11:52:39

 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     


 Q32. How to compile typescript ?TypeScript2018-10-15 11:52:59

 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     


 Q33. Can we compile multiple type script files together ? How ?TypeScript2018-10-15 11:53:20

 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     


 Q34. What is the use of this keyword in javascript ?Javascript2019-01-27 16:09:03

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


 Q35. What does 'variable hoisting' mean? JavaScript2019-02-02 15:27:12

Ans.

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

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q36. How do you debug Javascript code ?Javascript2019-04-09 08:59:26

 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     


 Q37. Which of the following file is called deployment descriptor ?Java EE
a. application.xml
b. web.xml
c. config.xml
d. web-application.xml

Ans.b. web.xml



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