Interview Questions and Answers for 'Infrastructure' | 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 'Infrastructure' - 19 question(s) found - Order By Newest

  Q1. 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


Basic and Very Frequently asked.
  Q2. What is Polymorphism in Java ?Core Java
Ans. Polymorphism means the condition of occurring in several different forms.

Polymorphism in Java is achieved in two manners

1. Static polymorphism is the polymorphic resolution identified at compile time and is achieved through function overloading whereas

2. Dynamic polymorphism is the polymorphic resolution identified at runtime and is achieved through method overriding.

  Sample Code for overloading

  Sample Code for overriding

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

   Like         Discuss         Correct / Improve     polymorphism  object oriented programming (oops)  oops concepts  oops concepts     Asked in 108 Companies      Basic        frequent

Try 2 Question(s) Test


Frequently asked in Infosys India
  Q3. What is a String Pool ?Core Java
Ans. String pool (String intern pool) is a special storage area in Java heap. When a string is created and if the string already exists in the pool, the reference of the existing string will be returned, instead of creating a new object and returning its reference.

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

   Like         Discuss         Correct / Improve     java   oops   string   string class   string pool   heap memory     Asked in 31 Companies      intermediate        frequent

Try 2 Question(s) Test


Usually asked in relation to casting and ClassCastException.
 Q4. What is instanceOf operator ? Explain it's use ?Core Java
Ans. The operator instanceOf is used to verify if the specified object is the instance of specified class or interface.

Syntax if(x instanceOf ABC)

where x is an object reference and ABC could be a class name or interface name. The above statement will be true if x holds an object that is an instance of ABC or any of the child class of ABC or if x holds an object that implements ABC.

instanceOf operator is used to verify in case of downcasting. For ex -

DerivedClass extends BaseClass

x is the reference of BaseClass but holds DerivedClass object ( Polymorphism )

There is an operation that is defined in Derived Class, let's say derivedClassMethod()

We cannot call derivedClassMethod() directly using x as x is reference of BaseClass and not DerivedClass and hence can only access methods that are defined in BaseClass and overridden in derived class.

Though we can cast it to DerivedClass as following
((DerivedClass)x).derivedClassMethod();

But it may throw ClassCastException in case x doesn't hold an instance of DerivedClass at that point.

So before casting it to DerivedClass we may like to make sure that it is an instance of DerivedClass and hence won't throw ClassCastException.

So we make a check for it

if(x instanceOf DerivedClass) {
((DerivedClass)x).derivedClassMethod();
}

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

   Like         Discuss         Correct / Improve     instanceOf  instanceOf operator  Why we need instanceOf operator  use of instanceOf operator     Asked in 2 Companies      Intermediate        frequent


 Q5. How can we manage Error Messages in the web application ?Solution
Ans. Within message.properties file.

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

   Like         Discuss         Correct / Improve     j2ee   web application   struts   spring     Asked in 1 Companies


Frequently asked in CTS ( Based on 2 feedback )
  Q6. What is the difference between comparable and comparator in java.util pkg?Core Java
Ans. Comparable interface is used for single sequence sorting i.e.sorting the objects based on single data member where as comparator interface is used to sort the object based on multiple data members.

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

   Like         Discuss         Correct / Improve     java   java.util   comparable   comparator   collections     Asked in 23 Companies      basic        frequent


  Q7. Write a method to check if input String is Palindrome?Core Java
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 38 Companies      Basic        frequent


 Q8. Why would a cloud customer use resources in multiple regions and zones ?Cloud Computing
Ans. 1. Fault Tolerance
2. Better Access by bringing the application closer to the users.

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

   Like         Discuss         Correct / Improve     Google Cloud Computing (GCP)  Amazon Web Services (AWS)  Availability Zones  Regions and Zones  Infrastructure


 Q9. What is JVM ?Core Java
Ans. JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed.JVMs are available for many hardware and software platforms (i.e. JVM is platform dependent).Runtime Instance Whenever you write java command on the command prompt to run the java class, an instance of JVM is createdThe JVM performs following operation:Loads codeVerifies codeExecutes codeProvides runtime environment

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

   Like         Discuss         Correct / Improve     memory management  jvm     Asked in 3 Companies      basic        frequent


 Q10. What are the different layers of cloud computing ?Infrastructure
Ans. Paas - Platform as a service
Iaas - Infrastructure as a service
Saas - Software as a service

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

   Like         Discuss         Correct / Improve     cloud computing  Amazon Web Service (AWS)  Google Cloud Platform (GCP)


 Q11. What is the use of final keyword ?Core Java
Ans. final keyword is a modifier that means differently when applied to variables, methods and classes.

1. Final variable cannot be changed once initialized
2. Final method cannot be overridden
3. Final class cannot be sub classed

  Sample Code for final variable

  Sample Code for final method

  Sample Code for final class

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

   Like         Discuss         Correct / Improve     final  final keyword     Asked in 1 Companies      Basic        frequent


Very frequently asked. Usually among very first few questions.
 Q12. Define encapsulation in Java ?Core Java
Ans. Encapsulation is a feature of OOP's that binds the data and it's associated methods together as a single unit and facilitate protection and data hiding by providing minimal interface to outside. For example - member variables are declared private and are accessed through public methods. Moreover we have private methods that can only be used internally and hence providing minimal interface to outside class through use of public methods.

  Sample Code for encapsulation

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

   Like         Discuss         Correct / Improve     encapsulation  object oriented programming (oops)  oops concepts  oops  oops concepts  oops features     Asked in 4 Companies      Basic        frequent


 Q13. What is Bastion host ?Infrastructure
 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     Amazon Web Service (AWS)


 Q14. Difference between Object based and Block based storage ?Infrastructure
 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     Amazon Web Service (AWS


 Q15. Difference between Containerization and Serverless ? Infrastructure
Ans. Following are key differences between containers and serverless:

Supported host environments: Containers can run on any modern Linux server, as well as certain versions of Windows. In contrast, serverless runs on specific host platforms, most of which are based in the public cloud (like AWS Lambda or Azure Functions).

Self-servicing ability. For the reasons just noted, in most cases, serverless functions require you to use a public cloud. (There are on-premises serverless frameworks, like Fn, but these are not yet widely used.) With containers, you can set up your own on-premises host environment, or use a public cloud service like ECS.

Cost. Because serverless environments are hosted in the cloud, you have to pay to use them. In contrast, you can set up a container environment yourself using open source code for free (although you’ll still have management costs, of course).

Supported languages. You can containerize an application written in any type of language as long as the host server supports the language. Serverless frameworks are different; they support a limited number of languages. The details of supported serverless language vary from serverless platform to platform.

Statefulness. Most serverless platforms are designed to support stateless workloads. (Some serverless providers offer limited support for stateful services; cf. Durable Functions on Azure.) Although you can connect to external storage services (like S3 on AWS) from within serverless platforms, the functions themselves cannot be stateful. Containers present their own persistent storage challenges, but creating stateful containerized apps is certainly possible.

Availability. Serverless functions are designed to run for a short period—usually, a few hundred seconds—before they shut down. Containers can run for as long as you need.

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

   Like         Discuss         Correct / Improve     Amazon Web Service (AWS)  serverless  containers  production support


 Q16. Why serverless is called serverless if there are actually servers serving the requests ?Infrastructure
Ans. Because Vendors need not worry about provisioning , managing and maintaining the servers and it's intrinsically taken care of by AWS.

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

   Like         Discuss         Correct / Improve     Amazon Web Services (AWS)  aws serverless  aws lambda  aws serverless computing  amazon cloud serverless computing  amazon lambda


 Q17. Have you ever worked on migration from enterprise network infrastruscture to Cloud Infrastructure ? What problems did you face ?Infrastructure
 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     


 Q18. What is the difference between Co Location, Virtualization and Serverless ? Infrastructure
 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     


 Q19. How On demand Self Service helps saving cost ?Cloud Computing
Ans. On Demand service restricts cost by paying only for the use and Self Service saves cost by reducing intermediary human resource cost.

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

   Like         Discuss         Correct / Improve     onDemand infrastructure  Google Cloud Platform (GCP)



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: