# Company 3

## Core Java

* Explain JVM
* Default size of JVM
* Default size of heap
* How to increase the size of heap
* What goes in the [stack](/the-tech-toolbox/question-answers/java-spring-boot.md#what-goes-in-the-stack-and-what-goes-in-the-heap-in-detail) and what goes in the heap in detail
* What is a weak reference
* What is a weak-hashmap
* How does GC work
* How to invoke GC
* What is the finalize method and in which class does it belong to
* Is the Object class an abstract class
* Difference between vector and arraylist and which is faster
* Stack and queue
* Queue implementations
* Explain the concurrency package and what has been added
* What is latchcount
* What is a cyclic barrier
* What is an atomic integer
* What is volatile
* What is serialization, what is transient
* What is callable and how is it different from runnable
* What is the executor framework and how many types are there
* What is a future object

## Miscellaneous

* What messaging have you worked on (e.g. JMS, RabbitMQ, etc.)
* What databases have you worked on
* Can there be two JVMs on a single machine

## AWS

* What services do you know in AWS
* What database is used in AWS
* Writing stored procedures

## Java 8

* What is a functional interface
* What is the Optional class
* What is the Stream API
* Why is the Stream API lazy
* Writing a lambda expression to create a thread and print your name
* Output of the following programs:

```java
List<Integer> numbers = Arrays.asList(1,2,3);
numbers.stream().filter(n -> {
  System.out.printf("Filtering => %d \n", n);
  return n%2 == 0;
});
```

<pre class="language-java"><code class="lang-java"><strong>List&#x3C;Integer> numbers = Arrays.asList(1,2,3);
</strong>numbers.stream().filter(n -> {
  System.out.printf("Filtering => %d \n", n);
  return n%2 == 0;
}).map(n -> {
  System.out.printf("Mapping => %d \n", n);
  return n * 2;
});
</code></pre>

```java
public class Demo {
  public static void main(String args[]) {
    int[] array = new int[10];
    printArray(array);
  }

  public void printArray(int[] array){
    for(int i : array)
      System.out.println(i);
  }
}
```

## Spring Boot

* What is the default server provided by Spring Boot (e.g. Tomcat, Netty, etc)
* What is the default underlying implementation of Spring Boot JPA
* Steps to implement security in Spring Boot
* How to change the default implementation of ORM in Spring Boot
* Difference between webservice and RESTful services
* What is JAX-RS

## Git

* What is the difference between `git pull` and `git fetch`

## Database

* What is indexing and why is it used
* What is a primary key
* Can you index a primary key
* How to write a stored procedure

## Microservices

* What is microservice architecture
* What is vertical and horizontal scaling
* How to handle failover for a database server


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tingreavinash.gitbook.io/the-tech-toolbox/question-answers/company-wise/fincity-interview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
