<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ankita Vaidya on Medium]]></title>
        <description><![CDATA[Stories by Ankita Vaidya on Medium]]></description>
        <link>https://medium.com/@ankita-vaidya?source=rss-d86ea6fb7fd2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*jbpZo3MRRgvIZ1Iy.</url>
            <title>Stories by Ankita Vaidya on Medium</title>
            <link>https://medium.com/@ankita-vaidya?source=rss-d86ea6fb7fd2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 13:49:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ankita-vaidya/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Java 8 Steams pratice]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-link"><a href="https://ankita-vaidya.medium.com/java-8-steams-pratice-f4b053b79c05?source=rss-d86ea6fb7fd2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://ankita-vaidya.medium.com/java-8-steams-pratice-f4b053b79c05?source=rss-d86ea6fb7fd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4b053b79c05</guid>
            <category><![CDATA[lambda-function]]></category>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[java-coding]]></category>
            <category><![CDATA[java8-streams]]></category>
            <category><![CDATA[java8]]></category>
            <dc:creator><![CDATA[Ankita Vaidya]]></dc:creator>
            <pubDate>Sun, 26 Jul 2026 13:00:00 GMT</pubDate>
            <atom:updated>2026-07-26T13:00:00.832Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Question on Multithreading Concept .]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://ankita-vaidya.medium.com/question-on-multithreading-concept-7b397087fca6?source=rss-d86ea6fb7fd2------2"><img src="https://cdn-images-1.medium.com/max/956/1*MfuW9rVbFNdmTAxJff08YA.png" width="956"></a></p><p class="medium-feed-snippet">Que : What is Process :</p><p class="medium-feed-link"><a href="https://ankita-vaidya.medium.com/question-on-multithreading-concept-7b397087fca6?source=rss-d86ea6fb7fd2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://ankita-vaidya.medium.com/question-on-multithreading-concept-7b397087fca6?source=rss-d86ea6fb7fd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b397087fca6</guid>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[multiprocessing]]></category>
            <category><![CDATA[multithreading-in-java]]></category>
            <category><![CDATA[process]]></category>
            <category><![CDATA[threads]]></category>
            <dc:creator><![CDATA[Ankita Vaidya]]></dc:creator>
            <pubDate>Thu, 04 Jun 2026 09:45:44 GMT</pubDate>
            <atom:updated>2026-06-05T08:05:15.694Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Java Interview Question for Senior Developer]]></title>
            <link>https://ankita-vaidya.medium.com/java-interview-question-for-senior-developer-68a0b37e13d9?source=rss-d86ea6fb7fd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/68a0b37e13d9</guid>
            <category><![CDATA[senior-developer]]></category>
            <category><![CDATA[senior-developer-skills]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[javainterviewprep]]></category>
            <category><![CDATA[javainterviewtips]]></category>
            <dc:creator><![CDATA[Ankita Vaidya]]></dc:creator>
            <pubDate>Sat, 30 May 2026 07:22:06 GMT</pubDate>
            <atom:updated>2026-06-13T10:35:57.060Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>QUE : What is immutability and why is String immutable?</em></strong></p><p>Immutability means an object’s state cannot be modified after it is created. Any operation that appears to change it actually creates a new object.</p><p>In programming languages like Java, the String class is immutable because it is designed to be highly optimized, secure, and safe to use across multiple threads.</p><p><strong><em>Why String is Immutable</em></strong></p><ul><li>Memory Efficiency &amp; String Pool: Strings are heavily reused. To save memory, the JVM stores identical string literals in a “String Constant Pool.” If strings were mutable, a change to one variable would unintentionally alter the value of every other variable sharing that memory reference.</li><li><strong><em>Thread Safety:</em></strong> Because their contents cannot be changed, immutable strings are inherently thread-safe. Multiple threads can read the same string simultaneously without requiring complex synchronization locks.</li><li><strong><em>Security:</em></strong> Sensitive data like usernames, passwords, file paths, and network ports are represented as strings. Immutability ensures their values cannot be changed mid-execution by malicious actors.</li><li><strong><em>Consistent Hash Codes: </em></strong>Since strings are often used as keys in hash-based data structures (like HashMaps), their hash code must remain consistent. Immutability guarantees that the hash code is cached and never changes.</li></ul><p><strong><em>Que : How JVM memory works?</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TQXBqQQbKtc9vqYvhu-HNA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7lizSAhCi_Gz80ZvZzXw4Q.png" /></figure><p>At runtime, the JVM creates a set of <strong>runtime data areas</strong>. These include:</p><ul><li>Heap Memory</li><li>Stack Memory</li><li>Method Area (Implemented as Metaspace in Java 8+)(Class area)</li><li>Program Counter (PC) Register</li><li>Native Method Stack</li></ul><ol><li><a href="https://www.digitalocean.com/community/tutorials/java-jvm-memory-model-memory-management-in-java#heap-memory"><strong>Heap Memory</strong></a><strong> :</strong></li></ol><p>heap memory is the primary area for dynamic memory allocation. All class instances, arrays, and objects created during program execution are stored here.</p><p>the heap is a <strong>shared memory space</strong>, accessible by all threads in the JVM.</p><p><strong><em>2. Stack</em></strong></p><p>It is a structured, fast-access memory region that tracks the flow of method calls and stores data relevant to individual method invocations.</p><p>When a thread is created, the JVM allocates a new <strong>Java stack</strong> for that thread. This stack consists of a series of <strong>stack frames</strong>, each representing a single method invocation. As methods are called and return, frames are pushed to and popped from the top of the stack in a strict <strong>last-in, first-out (LIFO)</strong> order.</p><p><strong>Each stack frame contains:</strong></p><ul><li><strong>Local variable array</strong>: Holds all method parameters and local variables declared within the method.</li><li><strong>Operand stack</strong>: Used internally by the JVM to evaluate expressions and store intermediate computations.</li><li><strong>Return value slot</strong>: Stores the result of the method call, if any, before passing it back to the calling method.</li><li><strong>Reference to the runtime constant pool</strong>: Allows the method to resolve field names, method names, and literals.</li></ul><h3><a href="https://www.digitalocean.com/community/tutorials/java-jvm-memory-model-memory-management-in-java#program-counter-pc-register">Program Counter (PC) Register</a></h3><p>The <strong>Program Counter (PC) register</strong> is a small but essential component of the JVM memory model. It plays a critical role in <strong>tracking the flow of execution</strong> for Java applications. While other memory areas like the heap and stack handle data and objects, the PC register is concerned with <strong>instruction-level control</strong>: keeping track of which bytecode instruction a thread should execute next.</p><p>Each thread in the JVM has its own private Program Counter register. This isolation is necessary because the JVM supports <strong>multithreaded execution</strong>, where multiple threads can run independently and simultaneously. By maintaining a separate PC for each thread, the JVM ensures that threads do not interfere with each other’s execution flow.</p><h3><a href="https://www.digitalocean.com/community/tutorials/java-jvm-memory-model-memory-management-in-java#native-method-stack">Native Method Stack</a></h3><p>The <strong>Native Method Stack</strong> is a dedicated memory region in the JVM that supports the execution of <strong>native methods</strong>, methods written in languages other than Java, such as C or C++. These methods are typically called through the <a href="https://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/intro.html"><strong>Java Native Interface (JNI)</strong></a>, which acts as a bridge between the JVM and native libraries.</p><h3>QUE : Provide Examples of Memory Allocation</h3><p>Example 1: Primitive Type Allocation</p><pre>public class MemoryExample {<br>    public static void main(String[] args) {<br>        int a = 10;      // Primitive int stored in the stack<br>        char b = &#39;A&#39;;    // Primitive char stored in the stack<br>    }<br>}</pre><p>Here, both `a` and `b` are stored directly in stack memory. When the method finishes execution, the stack frame (and the variables within it) will be removed.</p><p>Example 2: Object Reference Allocation</p><pre>public class MemoryExample {<br>    public static void main(String[] args) {<br>        MyClass obj = new MyClass();  // Reference in the stack, object in the heap<br>    }<br>}</pre><p>In this case:</p><p>- The `obj` reference is stored in the stack.</p><p>- The actual `MyClass` object is stored in the heap.</p><p>Example 3: Array Allocation</p><pre>public class MemoryExample {<br>    public static void main(String[] args) {<br>        int[] arr = new int[5];  // Reference in the stack, array in the heap<br>    }<br>}</pre><p>Arrays are also objects in Java, so the reference `arr` is stored in the stack, while the array object itself is stored in the heap.</p><p><strong><em>QUE : Difference between parallel stream and normal stream?</em></strong></p><p>In Java, a normal (sequential) stream processes elements one by one in a single thread, maintaining the collection’s encounter order.</p><p>A parallel stream, however, splits your data into multiple chunks and processes them across multiple CPU cores using the ForkJoinPool.commonPool().</p><p><strong>Feature || Normal Stream ||Parallel Stream</strong></p><p>Execution ||Single-threaded || Multi-threaded (splits into chunks)</p><p>Performance ||Slower for large datasets on multi-core processors ||Faster for heavy,CPU- intensive tasks</p><p>Overhead ||Minimal || High (thread creation, context switching, merging)</p><p>State/Ordering|| Preserves encounter order|| Order is not guaranteed (unless using forEachOrdered)</p><p><strong><em>When to use which?</em></strong></p><p><strong><em>Use Parallel Streams when:</em></strong></p><ul><li><strong>You have large datasets: </strong>The overhead of splitting and merging tasks only pays off on massive collections.</li><li><em>The operations are CPU-heavy</em>: Tasks like complex mathematical calculations or image processing benefit immensely.</li><li><strong>Order doesn’t matter:</strong> If your operation is purely functional and doesn’t depend on element sequence (e.g., filter or map).</li><li><strong><em>Stick to Normal Streams when:</em></strong></li><li><strong>I/O operations are involved</strong>: Network calls or database queries block threads, which starves the ForkJoinPool and hurts overall application performance.</li><li><strong>Stateful operations are required:</strong> If operations depend on previous elements (like distinct() or limit()), parallelizing introduces bottlenecks and race conditions.</li><li><strong>Shared mutable state is used:</strong> Parallel streams will cause concurrent modification exceptions or dirty reads unless you over-synchronize, which defeats the purpose.</li></ul><p>What is PULL vs Push vs Hybrid</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FO1SpXy1aY6U%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DO1SpXy1aY6U&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FO1SpXy1aY6U%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6c1f9de6af82ecb8904e4bbf78cdcaed/href">https://medium.com/media/6c1f9de6af82ecb8904e4bbf78cdcaed/href</a></iframe><p>Latency vs Throughput</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FOrfzEWw-8vo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DOrfzEWw-8vo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FOrfzEWw-8vo%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1865c936d2da95d77649a0f5aaf90aa9/href">https://medium.com/media/1865c936d2da95d77649a0f5aaf90aa9/href</a></iframe><p>CAP Theorm:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F9gIqjnwt3lY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9gIqjnwt3lY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F9gIqjnwt3lY%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1303bc2403db4ada1ecc5c9fe9c6211b/href">https://medium.com/media/1303bc2403db4ada1ecc5c9fe9c6211b/href</a></iframe><h3>Database Partitioning vs Sharding | System Design with Real Life Examples</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FfeyeQfLNT_8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DfeyeQfLNT_8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FfeyeQfLNT_8%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3379e292e1ecf3d39ed371dfb358c02b/href">https://medium.com/media/3379e292e1ecf3d39ed371dfb358c02b/href</a></iframe><h3>Load Balancer in System Design</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FTavIqNcnwSA%3Flist%3DPLxCzCOWd7aiHanm1nA5_fMwbx5dCNFkDX&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTavIqNcnwSA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FTavIqNcnwSA%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fb5e3389b6190ac35379cb64f345f4a3/href">https://medium.com/media/fb5e3389b6190ac35379cb64f345f4a3/href</a></iframe><h3>Content Delivery Network (CDN) | How it works</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FouqqU0FJjhQ%3Flist%3DPLxCzCOWd7aiHanm1nA5_fMwbx5dCNFkDX&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DouqqU0FJjhQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FouqqU0FJjhQ%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/ec3030a6e501084a206c421f19320981/href">https://medium.com/media/ec3030a6e501084a206c421f19320981/href</a></iframe><h3>Lec-6: What are SSL Certificates &amp; How they work? | System Design</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Flh2K_kDH5s0%3Flist%3DPLxCzCOWd7aiHanm1nA5_fMwbx5dCNFkDX&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dlh2K_kDH5s0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Flh2K_kDH5s0%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/133a8020e1d342e0bdb10dbe66a34e72/href">https://medium.com/media/133a8020e1d342e0bdb10dbe66a34e72/href</a></iframe><h3>Database Partitioning | How it is Done in System Design</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F4B1KjOP-A58%3Flist%3DPLxCzCOWd7aiHanm1nA5_fMwbx5dCNFkDX&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4B1KjOP-A58&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F4B1KjOP-A58%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b02121962c33ec445d5cdbff75569594/href">https://medium.com/media/b02121962c33ec445d5cdbff75569594/href</a></iframe><h3>60+ Real Microservices Scenario Based Interview Ques [Java Springboot]</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fc2nGGHkTjqE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dc2nGGHkTjqE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fc2nGGHkTjqE%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a768a3ab8df9e2418f70361ea9d560e0/href">https://medium.com/media/a768a3ab8df9e2418f70361ea9d560e0/href</a></iframe><h3>Que : Indexing and its types | Complete DBMS Course | Jobs | Placements</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FA2hEyCc2QUY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DA2hEyCc2QUY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FA2hEyCc2QUY%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/de836f6afcb39dcf50a9a0a01a4d7035/href">https://medium.com/media/de836f6afcb39dcf50a9a0a01a4d7035/href</a></iframe><h3>Java Call by Value vs Call by Reference</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FnxxT55FLmHo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DnxxT55FLmHo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FnxxT55FLmHo%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/24990417898b42d2dd6f53bc429504eb/href">https://medium.com/media/24990417898b42d2dd6f53bc429504eb/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FMpMjB_fSGUA%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DMpMjB_fSGUA&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FMpMjB_fSGUA%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cd1dc8d6a5bb919f8ee4886af528979d/href">https://medium.com/media/cd1dc8d6a5bb919f8ee4886af528979d/href</a></iframe><p>Que : ExecutorService and its types</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FeUICcRnU2S0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DeUICcRnU2S0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FeUICcRnU2S0%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d80ac4c922a3e3fc11e67627045d17b4/href">https://medium.com/media/d80ac4c922a3e3fc11e67627045d17b4/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*STb5o8a0_ZgOKHcLI_uqhQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*12ySTUc3kiDiBoEjND5JWw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*YWpCHQp3ktl8UAR5xrvBiw.png" /></figure><p><a href="https://www.geeksforgeeks.org/java/what-is-java-executor-framework/">Java Executor Framework - GeeksforGeeks</a></p><p>Que : What is CompletableFuture</p><h4>CompletableFuture is used to perform asynchronous and non-blocking tasks efficiently.</h4><h4>Introduced in Java 8, it allows tasks to run in separate threads and provides powerful methods to manage, combine, and process results of asynchronous computations.</h4><ul><li>Part of the java.util.concurrent package and implements Future and CompletionStage.</li><li>Supports chaining multiple asynchronous tasks using methods like thenApply() and thenAccept().</li><li>Helps improve application performance by executing tasks concurrently without blocking the main thread.</li></ul><h3>Creating a CompletableFuture</h3><p>CompletableFuture can be created using the supplyAsync() method, which runs a task asynchronously in a separate thread and returns the result later.</p><ul><li>supplyAsync() is a static method of the CompletableFuture class.</li><li>It accepts a Supplier functional interface as an argument.</li><li>Supplier takes no input and returns a value.</li></ul><h3>Composing CompletableFuture</h3><h4>It allows multiple asynchronous tasks to be combined and processed together using composition methods. These methods create a new CompletableFuture based on the result of previous tasks.</h4><ul><li>thenApply() is used to transform the result of a task.</li><li>thenCombine() combines results of two independent CompletableFuture objects.</li><li>thenCompose() chains dependent asynchronous tasks together.</li></ul><h3>Handling Multiple CompletableFutures</h3><h4>CompletableFuture provides methods to manage multiple asynchronous tasks running in parallel. It helps coordinate tasks and process results after one or all tasks are completed.</h4><ul><li>allOf() waits for all CompletableFuture tasks to complete.</li><li>anyOf() completes when any one of the tasks finishes first.</li><li>Useful for executing multiple independent tasks concurrently.</li></ul><h4>Handling Exception in CompletableFuture</h4><h4>CompletableFuture provides built-in methods to handle exceptions that occur during asynchronous execution. These methods help manage errors and continue program execution smoothly.</h4><ul><li>exceptionally() is used to return a fallback value when an exception occurs.</li><li>handle() processes both successful results and exceptions together.</li><li>Helps improve reliability and error handling in asynchronous tasks.</li><li>Check <a href="https://www.geeksforgeeks.org/java/completablefuture-in-java/">https://www.geeksforgeeks.org/java/completablefuture-in-java/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68a0b37e13d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microservice Interview Questions]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">QUE : What is idempotency in microservices?</p><p class="medium-feed-link"><a href="https://ankita-vaidya.medium.com/microservice-interview-questions-d27f77417164?source=rss-d86ea6fb7fd2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://ankita-vaidya.medium.com/microservice-interview-questions-d27f77417164?source=rss-d86ea6fb7fd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/d27f77417164</guid>
            <category><![CDATA[microservicedeveloper]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[javadevelopersmumbai]]></category>
            <category><![CDATA[senior-developer]]></category>
            <category><![CDATA[interview-questions]]></category>
            <dc:creator><![CDATA[Ankita Vaidya]]></dc:creator>
            <pubDate>Fri, 29 May 2026 14:33:17 GMT</pubDate>
            <atom:updated>2026-05-29T14:55:49.073Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[SpringBoot Interview Question-answer for senior developer]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://ankita-vaidya.medium.com/springboot-interview-question-answer-for-senior-developer-6b00dbce7828?source=rss-d86ea6fb7fd2------2"><img src="https://cdn-images-1.medium.com/max/1562/0*jzoqJl6V88KoLWB3" width="1562"></a></p><p class="medium-feed-snippet">Que : How do you externalize configurations in Spring Boot?</p><p class="medium-feed-link"><a href="https://ankita-vaidya.medium.com/springboot-interview-question-answer-for-senior-developer-6b00dbce7828?source=rss-d86ea6fb7fd2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://ankita-vaidya.medium.com/springboot-interview-question-answer-for-senior-developer-6b00dbce7828?source=rss-d86ea6fb7fd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b00dbce7828</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[configuration]]></category>
            <category><![CDATA[javadevlopment]]></category>
            <dc:creator><![CDATA[Ankita Vaidya]]></dc:creator>
            <pubDate>Thu, 28 May 2026 12:59:36 GMT</pubDate>
            <atom:updated>2026-06-19T12:23:24.745Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Create sample API 
Here’s a simple Create Employee API example where I’ve applied industry best…]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://ankita-vaidya.medium.com/create-sample-api-heres-a-simple-create-employee-api-example-where-i-ve-applied-industry-best-8a9eeea12a6b?source=rss-d86ea6fb7fd2------2"><img src="https://cdn-images-1.medium.com/max/886/1*H5iHIyU_g9rJZT__dU3Q1w.jpeg" width="886"></a></p><p class="medium-feed-link"><a href="https://ankita-vaidya.medium.com/create-sample-api-heres-a-simple-create-employee-api-example-where-i-ve-applied-industry-best-8a9eeea12a6b?source=rss-d86ea6fb7fd2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://ankita-vaidya.medium.com/create-sample-api-heres-a-simple-create-employee-api-example-where-i-ve-applied-industry-best-8a9eeea12a6b?source=rss-d86ea6fb7fd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a9eeea12a6b</guid>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[spring-boot-annotation]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[java-annotations]]></category>
            <dc:creator><![CDATA[Ankita Vaidya]]></dc:creator>
            <pubDate>Wed, 13 May 2026 12:33:25 GMT</pubDate>
            <atom:updated>2026-05-13T12:33:25.486Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Java Stream Problems: Shortcut Tricks.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">2. First Non-Repeated Character</p><p class="medium-feed-link"><a href="https://ankita-vaidya.medium.com/java-stream-problems-shortcut-tricks-bbf2c92832c5?source=rss-d86ea6fb7fd2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://ankita-vaidya.medium.com/java-stream-problems-shortcut-tricks-bbf2c92832c5?source=rss-d86ea6fb7fd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbf2c92832c5</guid>
            <category><![CDATA[tips-and-tricks]]></category>
            <category><![CDATA[javacodingtips]]></category>
            <category><![CDATA[java8-streams]]></category>
            <category><![CDATA[streamsapi]]></category>
            <dc:creator><![CDATA[Ankita Vaidya]]></dc:creator>
            <pubDate>Wed, 13 May 2026 12:23:29 GMT</pubDate>
            <atom:updated>2026-09-10T06:27:03.426Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Java 8: Interview Sample coding question]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Answers:</p><p class="medium-feed-link"><a href="https://ankita-vaidya.medium.com/java-8-interview-sample-coding-question-d2467749e71a?source=rss-d86ea6fb7fd2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://ankita-vaidya.medium.com/java-8-interview-sample-coding-question-d2467749e71a?source=rss-d86ea6fb7fd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2467749e71a</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[java8-streams]]></category>
            <category><![CDATA[coding-interview-problems]]></category>
            <dc:creator><![CDATA[Ankita Vaidya]]></dc:creator>
            <pubDate>Tue, 12 May 2026 09:07:42 GMT</pubDate>
            <atom:updated>2026-05-12T09:41:21.262Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[SpringBoot interview Question]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://ankita-vaidya.medium.com/springboot-interview-question-573ab8180bea?source=rss-d86ea6fb7fd2------2"><img src="https://cdn-images-1.medium.com/max/1154/1*5ySMJa9jzInjJtnqY2wC6Q.png" width="1154"></a></p><p class="medium-feed-snippet">An API suddenly starts responding in 8 seconds after deployment. How would you debug it ?</p><p class="medium-feed-link"><a href="https://ankita-vaidya.medium.com/springboot-interview-question-573ab8180bea?source=rss-d86ea6fb7fd2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://ankita-vaidya.medium.com/springboot-interview-question-573ab8180bea?source=rss-d86ea6fb7fd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/573ab8180bea</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[scenario-based-learning]]></category>
            <dc:creator><![CDATA[Ankita Vaidya]]></dc:creator>
            <pubDate>Mon, 11 May 2026 06:25:29 GMT</pubDate>
            <atom:updated>2026-05-28T11:48:46.323Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Smartwork tricks to clear TCS Digital Capability Assessment Interview]]></title>
            <link>https://ankita-vaidya.medium.com/smartwork-tricks-to-clear-tcs-digital-capability-assessment-interview-a9a85c5b84e?source=rss-d86ea6fb7fd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9a85c5b84e</guid>
            <dc:creator><![CDATA[Ankita Vaidya]]></dc:creator>
            <pubDate>Sat, 27 Feb 2021 05:51:52 GMT</pubDate>
            <atom:updated>2021-03-05T15:24:27.378Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*O-GvcfM1KZX0G2ByZDE4aA.png" /><figcaption>Digital Capability Assessment Interview March-2021</figcaption></figure><p>Hey Hi TCSers guys,</p><p>First of all thanks to you for reading my <a href="https://ankita-vaidya.medium.com/smartwork-tricks-to-pass-tcs-digital-capability-assessment-645f501744dc">First Blog</a> and giving me a huge response in terms of comments, claps, asking questions .</p><p>One more thanks for keep my blog on top visited sites in the google search. I hope I clear your doubts and you all do very well in Digital Capability Assessment <strong>(DCA).</strong> Most of the guys commented, linkedIn message, emailed me and insist me to write other blog for “How to prepare for interview?”.</p><p>So Guys on behalf of your request, I wrote second blog “How to prepare for DCA Interview”.</p><p><strong>Following are some of the common questions may be asked in the interview</strong>.</p><p>(Note: In the blog I have shared some of my interview experience and questions that I had asked in my DCA interview. I answered to the interviewer according to my job profile and work experience that I have.)</p><p><strong>1. Prerequisite to be complete before going for interview.</strong></p><p><strong>2. Tell me about your current project? What is your role in the project? Responsibilities that you have and how do u handle them?</strong></p><p><strong>3. Where do you see yourself in the next 2 years?</strong></p><p><strong>4. What is the advantage if you will be a TCS Digital Cadre?</strong></p><p><strong>5. Do you remember the code that you wrote in DCA ? Is any other way to do it? Have you participated in any other coding contest?</strong></p><p><strong>6. What will you do if you won’t clear DCA?</strong></p><p><strong>1. Prerequisite to be complete before going for interview.</strong></p><p><strong><em>Update your personal online profile and make it 100% complete.(TCS Digital Profile and LinkedIn account is must.)</em></strong></p><p><strong><em>A. Profiles comes under TCS account(Accessible only to TCSers)</em></strong></p><p>i. Digital Profile (clearly mention your achievements, engagements, other roles and make the profile 100% complete)</p><p>ii. Self-Declare Competency</p><p>iii. Xcelerate Profile</p><p>iv. Knome account .</p><p><strong>B. Other Public profiles</strong></p><p>i. LinkedIn Profile-(Resume-2pages, add links of your personal websites, certificates)</p><p>ii. Github/Gitlab(any other open source platform)</p><p>(Upload your projects, findings, research paper)</p><p>iii. Coding Platform account (Codechef, Codeforces, LeetCode, GeeksForGeeks, etc.)</p><p>iv. Mention your online profile account links (Youtube, blogs, Pinterest, stackoverflow)</p><p>v. Mention your hobbies.</p><p><strong><em>In Simple words: Interviewer must realize that you are not only speaking but you are practically experiencing, working in both Tech and Non-tech area and online profile account links are the proof for that)</em></strong></p><p><strong>2.Tell me about your current project? What is your role in the project? Responsibilities that you have and how do u handle them?</strong></p><p>I think associates who are eligible for this assessment may have few months of experience or some may have experience upto 3 years. Answer of this question is according to the your work experience and the projects in which you have worked.</p><p>First of all tell them about your project ,client , project related to which domain , what is the aim that you have to achieve in the project, what you are learning form the project, what is your role in the project. How you handle the situation if you face difficulties<em>.</em><strong><em>(Always keep in mind that you are working in a team so never say that I am the only person doing this and that in the project).</em></strong></p><p>If you explain a real life example of difficult situation that you face and how you handle that situation , this will be more impactful for interviewer.<strong>(<em>Be always true with the interviewer</em>, </strong>even-though you are doing a very small task in this big project but let him know that you are learning from the task that you have assign.</p><p><strong>My Interview Experience: </strong>At the time of my DCA interview , I had only 8 month of job experience. For interviewer I was a like a fresher associate. He has asked me about my ILP trainings and my college projects.</p><p>While explaining project don’t go directly with the technology , languages ,tools that you are using.</p><p>First tell them that it was a group project . We all worked in a team .Tell them how idea comes in your mind to do this project. What were the disadvantages/difficulties previously was and by doing this project we had achieved something which is helpful to others. Tell them how your project is efficient in small organization and in big organization , how you achieved the project in cheaper cost.</p><p>Lastly tell them the technologies ,tools, languages that you have used.</p><p><strong><em>(Obviously everything is available on the google but try to explain them how you think out-of-box, co-relate your real life practical examples , what are the difficulties / disadvantages that you are facing and for that how you are using your knowledge or google while doing projects.)</em></strong></p><p><strong>3. Where do you see yourself in the next 2 years?</strong></p><p>According to your job profile you can answer this question. But remember tell your past experience /sacrifice that you have done to achieve this position. Explain your past, present and future situation</p><p><strong>Past :</strong> What you did in your past life .If u have some proofs like online links then tell interviewer that you can google me/ youtube me you can see my posts/blogs/projects there.</p><p><strong>Present:</strong></p><p>1.What you are doing now-a-days , apart from project work what you are learning .(Tech and non-tech in both areas)</p><p>2. From where your are leaning (ievolve, frescoplay, udemy, LinkedIn Learning , coursera)</p><p>3.If you are doing any internal projects (Upload that projects on open source platform )</p><p>4. If you are doing coding (Tell them the coding platform ).</p><p><strong><em>Inshort realize the interviewer: to change your future you are continuously learning and you have the statistics or proofs of your learning on your online accounts</em></strong><em>.</em></p><p><strong>4. What is the advantage if you will be a TCS Digital Cadre?</strong></p><p>Apart from the job designation and compensation benefits I will get chance to work in new technologies project such as AI,ML, image processing, Robotics, IOT etc.</p><p><strong>My interview experience:</strong> Actually I am from TCS Pune location. At that time I never get chance to work in TCS Digital /TCS Digitate/Ignio product projects because I was Assistant System Engineer Grade –Y (ASE) so RMG refused me.</p><p>If I would be TCS Digital Cadre I will asked RMG please assign me a project according to my knowledge and intelligence level.</p><p><strong><em>In short-you must know what will you achieve after gaining tag of “TCS Digital Cadre”, You must be aware about your future, in which good projects do you want to work .</em></strong></p><p><strong>5. Do you remember the code that you wrote in DCA is any other way to do it? Have you participated in any other coding contest?</strong></p><p>Yes I remember the code .I can do the same code in different way as well.I can reduce the code complexity by using Data structures like queue, stack, hash-map.</p><p>Past experience: During my college days I used take part in hackathons. I had participated in “Codevita “ challenge organized by TCS.</p><p>Present experience: Now-a-days I am participating in Global hackathons on “Fresco-play “ platform</p><p><strong><em>In Short realize interviewer that you are aware and using learning platforms provided by TCS . Apart from the office work you are actively keep learning new concepts.</em></strong></p><p><strong>6. What will you do if you won’t clear DCA?</strong></p><p>i. First of all I will find root cause of ‘Why I won’t clear DCA?’. I will improve myself in those area by continuously learning and practicing.</p><p>ii. TCS is conducting DCA assessment two times in a year , so I will give the same assessment in the month of july-august.</p><p>iii.“Elevate Wings 1” this is another carrier growth platform.I will give “Elevate Wings 1 Assessment”</p><p>iv. Currently I am completing the frescoplay courses and ievolve courses to achieve competencies in some specific technology.</p><p><strong><em>In simple words: Realize interviewer that from your failures you are learning something and you are actively working to overcome your failure points.</em></strong></p><p>So Guys,</p><p>With interviewer be always real and true, speak politely and always try to make every impossible thing to possible.</p><p><strong>“Always BE you, the world will adjust.”</strong></p><p><strong><em>Note:</em></strong></p><ol><li>While answering to the interviewer keep your job role and work experience in your mind and answer according to that</li><li>Non TCSers guys may not understand some terms because that terms or words or accounts related to TCS associates only.</li><li>If you like my blog then please comment and applause for the blog.</li><li>If you have any question then please put it as a comment .I will try to answer.</li></ol><p>Next blog Coming Soon…<strong>“Tales of my Career Journey in TCS…”</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9a85c5b84e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>