Interview Questions and Answers for 'T' | 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 - Order By Rating

   next 30
 Q91. Difference between XSS and CSRF ?Security
Ans. SRF attack requires an authenticated session, whereas an XSS attack doesn’t.
XSS doesn’t require any user interaction.CSRF is restricted to the actions the victim can perform.
XSS requires a vulnerability to happen, whereas CSRF relies on tricking the user to click a link or access a page.
CSRF can only send an HTTP request but cannot view the response. XSS can send and receive HTTP requests and responses to extract the required data.

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

   Like         Discuss         Correct / Improve     xss attack  csrf attack  security vulnerabilities  security attack  web security     Asked in 3 Companies


 Q92. Do you think a csrf token should only be generated after authentication ?Security
Ans. No, they should be created before authentication too

https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#login-csrf

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

   Like         Discuss         Correct / Improve     csrf token  csrf attack


 Q93. What is a csrf token ? What is it used for ?Security
Ans. A CSRF token is a unique, secret, unpredictable value that is generated by the server-side application and transmitted to the client in such a way that it is included in a subsequent HTTP request made by the client. When the later request is made, the server-side application validates that the request includes the expected token and rejects the request if the token is missing or invalid.

CSRF tokens can prevent CSRF attacks by making it impossible for an attacker to construct a fully valid HTTP request suitable for feeding to a victim user. Since the attacker cannot determine or predict the value of a user's CSRF token, they cannot construct a request with all the parameters that are necessary for the application to honor the request.

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

   Like         Discuss         Correct / Improve     csrf token.csrf attack


 Q94. Have you ever heard about csrf attacks ?Security
Ans. Yes, Cross-Site Request Forgery (CSRF) is an attack that forces an end user to execute unwanted actions on a web application in which they're currently authenticated.

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

   Like         Discuss         Correct / Improve     csrf attack  Cross-Site Request Forgery (CSRF)     Asked in 16 Companies


 Q95. Can the value of a static variable be changed ? Core Java
Ans. Yes the value of a static variable can be changed. It's the final keyword that restrict the modification of value not static.


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

   Like         Discuss         Correct / Improve     static variables


 Q96. If you see bad code, would you rewrite it?General
 This question was recently asked at 'McLeod Software'.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


 Q97. Give an example of a time when someone provided critical feedback on your workGeneral
 This question was recently asked at 'State Farm'.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


 Q98. How you debug and troubleshoot slowness with a REST call?Rest
 This question was recently asked at 'Barclays'.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


 Q99. What are your goals: personal, business, financialGeneral
 This question was recently asked at 'Cain Realty Group'.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


 Q100. How would you design the database schema for an event?Database
Ans. Broad question, but if the company need velocity, think about use a NO SQL instead of regular SQL databases.

Also prefers materialized views instead of joins to fetch data quickly.

Regarding the database design, there are very good design tools for professional database (to develop proper indexes and good database design) one of the best is QuickDBD

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

   Like         Discuss         Correct / Improve     database design  database schema     Asked in 1 Companies


 Q101. Write a unit test case using java 8.JUnit
Ans. public List convertAllToUpperCase(List words) {
return words.stream().map(String::toUpperCase).collect(Collectors.toList());
}

@Test
public void testAllToUpperCase() {
List expected = Arrays.asList("JAVA8", "STREAMS");
List result = convertAllToUpperCase(Arrays.asList("java8", "streams"));
assertEquals(expected, result);
}

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

   Like         Discuss         Correct / Improve     java8  java 8     Asked in 1 Companies


 Q102. Write a program to make an array act as a set.Core Java
Ans. public Set convertArrayToList(T array[]) {
Set set = new HashSet<>(Arrays.asList(array));
return set;
}

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

   Like         Discuss         Correct / Improve     arrays  collections set     Asked in 1 Companies


 Q103. Design Texas Hold Em poker gameDesign
 This question was recently asked at 'Alcatel Lucent'.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


 Q104. How can we protect an application from an XSS attack ?Security
Ans. By properly encoding data while persisting as well as retrieval.

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

   Like         Discuss         Correct / Improve     xss attack  web security     Asked in 3 Companies


 Q105. how would you build application stack using Cloud Formation ?
Amazon Web Services (AWS)
Ans. Open the AWS CloudFormation console at https://console.aws.amazon.com/cloudformation . Create a new stack by using one of the following options: Choose Create Stack. This is the only option if you have a currently running stack.

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

   Like         Discuss         Correct / Improve     aws cloud formation     Asked in 1 Companies


 Q106. How would you secure resources in Cloud ?Cloud Computing
Ans. There are multiple types of security GCP provides to every customer. Data, Network, Compute, and Services. Each service have its own security layer and Google provides clients to build as per the GCP best practices like building VPC, IAM, Firewall rules and so on

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

   Like         Discuss         Correct / Improve     Google Cloud Platform (GCP)     Asked in 1 Companies


 Q107. Name types of AWS Elastic Load Balancers.Amazon Web Services (AWS)
 This question was recently asked at 'EtQ'.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     aws elb     Asked in 1 Companies


 Q108. What is an AWS placement groupAmazon Web Services (AWS)
Ans. It is a logical grouping of instance with a single availability zone to prevent latency.

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

   Like         Discuss         Correct / Improve     aws placement group     Asked in 1 Companies


 Q109. What are some GCP Billing and Budgeting services ?Google Cloud Platform (GCP)
Ans. Budgets and Alerts
Reports
Quotas

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

   Like         Discuss         Correct / Improve     gcp billing


 Q110. 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)


 Q111. How Resource Pooling helps saving cost ?Cloud Computing
Ans. With resource pooling and Pay as per use , Bigger companies like Google and Amazon can buy Large physical hardware and employ economy of scale and hence resulting in cost saving for customers.

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

   Like         Discuss         Correct / Improve     Google Cloud Platform (GCP)


 Q112. What is the difference between Billing Alerts and Budget Quotas in GCP ?Google Cloud Platform (GCP)
Ans. Alerts only let customer knows of any excessive usage whereas Quota restricts the usage beyond a certain point.

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

   Like         Discuss         Correct / Improve     GCP Billing


 Q113. What are the different types of Services GCP provides ?Google Cloud Platform (GCP)
Ans. Compute
Network
Storage
Big Data
Machine Learning

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

   Like         Discuss         Correct / Improve     


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


 Q115. Is Google App Engine , IAAS, PAAS or SAAS ?Google Cloud Platform (GCP)
Ans. It's PAAS ( Platform as a service )

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

   Like         Discuss         Correct / Improve     Google App Engine


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


 Q117. How does cloud computing helps saves cost ?Cloud Computing
Ans. Cloud computing helps saving overall cost for infrastructure and service usage through following -

1. On demand Services and elasticity - You only pay for what you use. Less Ideal time.

2. Resource Pooling

3. Self Service - Less involvement of human resources

 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 Service (AWS


 Q118. Can we pass the junit test if the tested method throws the exception ? and Should we do that ?Junit
Ans. Yes, We can pass the test even if the tested method throws an exception.

One way is know as exception testing in which the tested method is expected to throw exception and hence the expectation is set accordingly.

@Test(expected = IndexOutOfBoundsException.class)
public void test(){}

Other way is to just ignore if the tested code throws an exception. In that case , we can enclose the tested method call in the try block and within exception block, we just return gracefully.

Exception testing is perfectly ok to be done as we would like test code in case an exception occurs and if the code is handling the exception properly. Ignoring the exception by putting the tested method call within try block isn't something normal and should be avoided.

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

   Like         Discuss         Correct / Improve     Junit exception testing


 Q119. What is the use of defining equals , compareTo and hashcode methods in a class ? Where are they used ?Core Java
Ans. equals, compareTo and hashcode are of use when the objects are used within collections.

Equals helps with collections that helps maintaining only unique objects ( like Set )

compare and compareTo helps with collections that helps maintaining objects in order ( TreeSet, TreeMap etc )

hascode helps with collections that facilitates hash searching ( like hashSet, hashMap etc )

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

   Like         Discuss         Correct / Improve     equals    compareTo   hashcode method


 Q120. Can we check two html radio buttons together ?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     html radio


previous 30   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: