Interview Questions and Answers for 'Web' | Search Interview Question - 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 Questions and Answers for 'Web' - 386 question(s) found - Order By Newest

next 30
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 ) and Epam Systems
  Q1. Difference between == and .equals() ?Core Java
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   == vs equals   equals vs ==     Asked in 294 Companies      basic        frequent

Try 6 Question(s) Test


  Q2. Explain OOPs

or

Explain OOPs Principles

or

Explain OOPs Concepts

or

Explain OOPs features

or

Tell me something about OOPs
Core Java
Ans. OOPs or Object Oriented Programming is a Programming model which is organized around Objects instead of processes. Instead of a process calling series of processes, this model stresses on communication between objects. Objects that all self sustained, provide security by encapsulating it's members and providing abstracted interfaces over the functions it performs. OOP's facilitate the following features

1. Inheritance for Code Reuse
2. Abstraction for modularity, maintenance and agility
3. Encapsulation for security and protection
4. Polymorphism for flexibility and interfacing

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

   Like         Discuss         Correct / Improve     oops  oops features     Asked in 260 Companies      basic        frequent


Very frequently asked. Favorite question in Walk in Drive of many Indian service companies. Frequently asked in HCL Technologies, TCS and Accenture.
  Q3. What is the difference between final, finally and finalize() ?Core Java
Ans. final - constant variable, objects cannot be de-referenced, restricting method overriding, restricting class sub classing.

finally - handles exception. The finally block is optional and provides a mechanism to clean up regardless of what happens within the try block. Use the finally block to close files or to release other system resources like database connections, statements etc.

finalize() - method helps in garbage collection. A method that is invoked before an object is discarded by the garbage collector, allowing it to clean up its state.

  Sample Code for final

  Sample Code for finally

  Sample Code for finalize

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

   Like         Discuss         Correct / Improve     java   oops   final   finally   finalize   final vs finally vs finalize     Asked in 61 Companies      basic        frequent

Try 4 Question(s) Test


Very Frequently asked. Have been asked in HCL Technologies very frequently ( based on 3 feedback ). Among first few questions in many interviews.
  Q4. Differences between abstract class and interface ?Core Java
Ans. Abstract classes can have both abstract methods ( method declarations ) as well as concrete methods ( inherited to the derived classes ) whereas Interfaces can only have abstract methods ( method declarations ).

A class can extend single abstract class whereas it can implement multiple interfaces.

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

   Like         Discuss         Correct / Improve     java   classes   abstract class   interfaces   abstract class vs interface   abstract classes vs interfaces     Asked in 82 Companies      basic        frequent


Recently asked in TCS , Tech Mahindra, HCL , Accenture and Fidelity.
  Q5. Explain Flow of Spring MVC ?Spring
Ans. The DispatcherServlet configured in web.xml file receives the request.

The DispatcherServlet finds the appropriate Controller with the help of HandlerMapping and then invokes associated Controller.

Then the Controller executes the logic business logic and then returns ModeAndView object to the DispatcherServlet.

The DispatcherServlet determines the view from the ModelAndView object.

Then the DispatcherServlet passes the model object to the View.

The View is rendered and the Dispatcher Servlet sends the output to the Servlet container.

Finally Servlet Container sends the result back to the user.

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

   Like         Discuss         Correct / Improve     j2ee   spring   mvc   frameworks   web applications   architecture     Asked in 11 Companies      Basic        frequent


 Q6. What is session tracking and how do you track a user session in servlets?Java EE
Ans. Session tracking is a mechanism that servlets use to maintain state about a series requests from the same user across some period of time. The methods used for session tracking are:

User Authentication - occurs when a web server restricts access to some of its resources to only those clients that log in using a recognized username and password

Hidden form fields - fields are added to an HTML form that are not displayed in the client's browser. When the form containing the fields is submitted, the fields are sent back to the server

URL rewriting - every URL that the user clicks on is dynamically modified or rewritten to include extra information. The extra information can be in the form of extra path information, added parameters or some custom, server-specific URL change.

Cookies - a bit of information that is sent by a web server to a browser and which can later be read back from that browser.

HttpSession- places a limit on the number of sessions that can exist in memory.

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

   Like         Discuss         Correct / Improve     j2ee   servlets   session   session management   web applications   cookies   httpsession   url rewriting   architecture     Asked in 1 Companies


Very frequently asked in companies using SOA.
  Q7. What are RESTful Web Services ?Rest
Ans. REST or Representational State Transfer is a flexible architecture style for creating web services that recommends the following guidelines -

1. http for client server communication,
2. XML / JSON as formatiing language ,
3. Simple URI as address for the services and,
4. stateless communication.

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

   Like         Discuss         Correct / Improve     java   web services   rest   java   j2ee  architecture     Asked in 14 Companies      intermediate        frequent


 Q8. What the difference between S3 and EFS ?Amazon Web Services (AWS)
Ans. EFS is file storage whereas S3 is object storage.

EFS is filesystem presented over IP network as normal OS drive, while S3 is HTTP accessed store.

EFS is capable of being mounted whereas S3 doesn't.

S3 has capabilities beyond just filesystem, there is whole metadata part where you can store info about your objects in S3.

As S3 is accessed over http , it's capable of hosting a static web site on it's own whereas EFS needs a computing and frontend service to have such capability.

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

   Like         Discuss         Correct / Improve     aws s3  aws storage  amazon cloud storage  amazon s3  aws ehs  aws s3  aws storage  amazon cloud storage  amazon s3 vs aws efs


Very frequently asked.Usually among first few questions.
  Q9. What is MVC ? Design
Ans. MVC is a Design Pattern that facilititates loose coupling by segregating responsibilities in a Web application

1. Controller receives the requests and handles overall control of the request
2. Model holds majority of the Business logic, and
3. View comprise of the view objects and GUI component

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

   Like         Discuss         Correct / Improve     j2ee   mvc   mvc design pattern   design pattern   struts   spring   web application   web frameworks   ebay     Asked in 60 Companies      basic        frequent

Try 1 Question(s) Test


 Q10. Difference between AWS Cloud Formation and AWS AMI ?Amazon Web Services (AWS)
Ans. AMI is an Amazon Machine Image. It contains the configuration to enable to boot up an EC2 instance with said configuration whereas Cloud formation is a templating language that allows to describe how to build a VPC and also allows you to create AWS services

AMI is templating specific to instances whereas the scope of CloudFormation templating is much bigger. CloudFormation could use AMI for launching instances along with other services.

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

   Like         Discuss         Correct / Improve     aws cloud formation  aws ami  amazon ami  aws ami  amazon ami vs aws cloud formation


 Q11. What are wrapper classes ?Core Java
Ans. They are wrappers to primitive data types. They allow us to access primitives as objects.

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

   Like         Discuss         Correct / Improve     java   data types   wrapper classes     Asked in 3 Companies      basic        frequent


 Q12. what is the use of cookie and session ? and What is the difference between them ?Java EE
Ans. Cookie and Session are used to store the user information. Cookie stores user information on client side and Session does it on server side. Primarily, Cookies and Session are used for authentication, user preferences, and carrying information across multiple requests. Session is meant for the same purpose as the cookie does. Session does it on server side and Cookie does it on client side. One more thing that quite differentiates between Cookie and Session. Cookie is used only for storing the textual information. Session can be used to store both textual information and objects.

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

   Like         Discuss         Correct / Improve     session   session management   java   cookies   authentication   web application   ebay      intermediate


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

or

What is the use of deployment descriptor ?
Java EE
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


 Q14. Design an e commerce application using AWS ? What AWS services will you use ?Amazon Web Services (AWS)
Ans. CloudFront for Static Media and cached content
EC2 and EKS ( Docker ) for main application computing
RDS and DynamoDB for Database
Lambda ( computing ) for running back end cron jobs
Kinesis for streaming and SQS for queuing
CloudWatch for Monitoring
CloudFormation for Infrastructure templating
S3 for Object Storage

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

   Like         Discuss         Correct / Improve     


 Q15. Difference between Region , Availability zone and Edge Locations ?Amazon Web Services (AWS)
Ans. A Region is a Geographical entity like US-East , US-West etc. Each Region may have multiple availability zones where each zone comprise of 1 or more Data Center located with each other.

Edge Locations are the sites that hosts cached content for faster delivery and for saving network traffic as they feed content from sites that are local or near to consumption.

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

   Like         Discuss         Correct / Improve     aws region  aws availability zone  aws edge location  region vs availabillity zone


 Q16. What are the different S3 storage Tiers ?Amazon Web Services (AWS)
Ans. S3 Standard
S3 IA - Infrequently Accessed
S3 One Zone IA - One Zone only , Infrequently Accessed
S3 Glacier - achieved

S3 Standard is most expensive , Glacier is least expensive

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

   Like         Discuss         Correct / Improve     aws s3  aws storage  amazon cloud storage  amazon s3


 Q17. What are the factors on which customers are charged for using S3 ?Amazon Web Services (AWS)
Ans. Storage Tier ( IA , Standard , Glacier etc )
Storage ( Volume of Data )
No of Requests
Meta Data
Data Transfer Speed acceleration through cache and Edge Location

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

   Like         Discuss         Correct / Improve     aws s3  aws storage  amazon cloud storage  amazon s3


 Q18. What are the factors on which price classes are based on in case of EC2, S3, CloudFront and EBS ?Amazon Web Services (AWS)
Ans. EC2 - Time and Reservation , Instance Type ( Memory , Computation power )
S3 - Accessibility Frequency , Data Transfer , Storage Space
CloudFront - Geography, No of Locations
EBS - IOPS, Access Frequency

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

   Like         Discuss         Correct / Improve     aws ec2  aws computing  amazon cloud computing  amazon ec2  aws s3  aws storage  amazon cloud storage  amazon s3  aws cloudfront  amazon cloudfront  aws ebs


 Q19. What are the different Route53 routing policies ?Amazon Web Services (AWS)
Ans. Simple
Weighted
Latency
Failover
GeoLocation
Multivalue

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

   Like         Discuss         Correct / Improve     aws route53     Asked in 1 Companies


 Q20. What is the relationship between VPC and subnet ? Can you tell with an example ?Networking
Ans. A VPC is devided into multiple subnets. Subnet in a particular VPC could be public or private.

For Example - A particular account may have multiple vpc's for each of the business type. For each Business or VPC , One can have different subnets to cater to each department so that access across departments could be restricted. But still there could be identities that have control over different subnets. Moreover we could have multiple subnets for each department so as to have distinguished public and private networks having different types of applications ( public facing or internal consumption )

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

   Like         Discuss         Correct / Improve     aws vpc  aws subnet  subnet  vpc  Amazon Web Services (AWS)


 Q21. Is Apache an application or Web server ?
Ans. Web server.

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

   Like         Discuss         Correct / Improve     apache   web server   j2ee


 Q22. Difference between the jsp scriptlet tag and jsp declaration tag?Java EE
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


  Q23. Difference between GET and POST Requests ?Web Service
Ans. GET is supposed to get information from the server. Client sends the minimal information so that Server can respond with the response body on basis of request. For example - You want to get complete employment record for employee id 123

POST is supposed to send the information for submission. Payload or a Body is usually sent so that it can be persisted on the server. For example - Sending the complete information of an employee ( id, name , dept etc ) to the server for persisting it.

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

   Like         Discuss         Correct / Improve     get vs post   web service   rest     Asked in 11 Companies      basic        frequent


Usually asked to entry level software developers.
  Q24. Write a program to swap two variables without using thirdCore Java
Ans. public static void main(String[] args) {
   int num1 = 1;   
   int num2 = 2;
   num1 = num1^num2;
   num2 = num1^num2;
   num1 = num1^num2;
   System.out.print("num1 = " + num1 +", num2 = "+num2);
}

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

   Like         Discuss         Correct / Improve     code  coding     Asked in 37 Companies      basic        frequent


 Q25. What is the difference between single instance Web environment and Load Balanced Auto Scaling ? Amazon Web Services (AWS)
Ans. Single instance means there is only 1 instance that will bear all the traffic load whereas Load balanced server means that there will be a cluster of servers that will host the application and load will be balanced distributed among them. Auto Scaling means that the number of instances will be expanded / shrunken based on the rule. Rule could be the traffic count , response time etc.

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

   Like         Discuss         Correct / Improve     load balancing  auto scaling  aws  elastic beanstalk


 Q26. What is cloud computing ?Cloud Computing
Ans. Cloud Computing is a way of using IT infrastructure with following traits -

1. On Demand Infrastructure
2. Broad Network Access
3. Resource Pooling
4. Rapid Elasticity
5. Measured Service

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

   Like         Discuss         Correct / Improve     google cloud platform (GCP)  Amazon Web Services (AWS


 Q27. What are the services provided by AWS ?Amazon Web Services (AWS)
Ans. AWS provides various types of services like Computing ( EC2 , Lambda , EKS ), Storage ( S3, Glacier ), Database ( RDS , DynamoDB ), Streaming ( Kinesis ), Queue ( SQS ), Security and Access ( IAM ) etc.

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

   Like         Discuss         Correct / Improve     


 Q28. What are the problems one could face while working with serverless technologies like AWS Lambda ?Amazon Web Services (AWS)
Ans. Warm up time for certain technologies like Java ( JVM Warmup )

Performance

Size of Deployable ( Bigger size packaging should go in S3 )

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

   Like         Discuss         Correct / Improve     serverless technologies  aws lambda  aws serverless computing  amazon cloud serverless computing  amazon lambda     Asked in 1 Companies


 Q29. What is the cost of using Cloud Formation ?Amazon Web Services (AWS)
Ans. Cloud Formation does not have any additional cost but you are charged for the underlying resources it builds.

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

   Like         Discuss         Correct / Improve     aws cloud formation


 Q30. How does AWS Lambda handle failure during event processing?Amazon Web Services (AWS)
Ans. In AWS Lambda we can run a function in synchronous or asynchronous mode. In synchronous mode, if AWS Lambda function fails, then it will just give an exception to the calling application. In asynchronous mode, if AWS Lambda function fails then it will retry the same function at least 3 times.If AWS Lambda is running in response to an event in Amazon DynamoDB or Amazon Kinesis, then the event will be retried till the Lambda function succeeds or the data expires. In DynamoDB or Kinesis, AWS maintains data for at least 24 hours.

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

   Like         Discuss         Correct / Improve     aws lambda  aws serverless computing  amazon cloud serverless computing  amazon lambda


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: