<?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 Manoj Pandey on Medium]]></title>
        <description><![CDATA[Stories by Manoj Pandey on Medium]]></description>
        <link>https://medium.com/@mktechm?source=rss-b490575212ad------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qdbBLuNxCFtasxQP8On7xA.jpeg</url>
            <title>Stories by Manoj Pandey on Medium</title>
            <link>https://medium.com/@mktechm?source=rss-b490575212ad------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 14:32:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mktechm/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 program to return the odd numbers and their frequency from an integer array list passed as an…]]></title>
            <link>https://medium.com/@mktechm/java-program-to-return-the-odd-numbers-and-their-frequency-from-an-integer-array-list-passed-as-an-4b67e081ee96?source=rss-b490575212ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b67e081ee96</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[java8]]></category>
            <dc:creator><![CDATA[Manoj Pandey]]></dc:creator>
            <pubDate>Mon, 29 Jul 2024 10:30:59 GMT</pubDate>
            <atom:updated>2024-07-29T10:30:59.042Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>Java program to return the odd numbers and their frequency from an integer array list passed as an input parameter using stream api:</em></h3><pre>import java.util.Arrays;<br>import java.util.List;<br>import java.util.Map;<br>import java.util.stream.Collectors;<br><br>public class InterviewQuestions {<br><br> public static void main(String[] args) {<br><br>//I/P: 1, 2, 3, 4, 4, 5, 6, 7, 7, 5<br>// O/P: {1=1, 3=1, 5=2, 7=2}<br><br>  List&lt;Integer&gt; intList = Arrays.asList(1, 2, 3, 4, 4, 5, 6, 7, 7, 5);<br>  System.out.println(countOfOddNumber(intList));<br> }<br><br> private static Map&lt;Integer, Long&gt; countOfOddNumber(List&lt;Integer&gt; intList) {<br><br>  List&lt;Integer&gt; oddList = intList.stream().filter(e1 -&gt; e1 % 2 != 0).collect(Collectors.toList());<br><br>  return oddList.stream().collect(Collectors.groupingBy((e1 -&gt; e1), Collectors.counting()));<br><br> }<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b67e081ee96" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to delete large amount of data from Oracle table ?]]></title>
            <link>https://medium.com/@mktechm/how-to-delete-large-amount-of-data-from-oracle-table-3d83a3f431b5?source=rss-b490575212ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d83a3f431b5</guid>
            <dc:creator><![CDATA[Manoj Pandey]]></dc:creator>
            <pubDate>Sat, 10 Sep 2022 05:22:37 GMT</pubDate>
            <atom:updated>2022-12-04T17:17:16.853Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to delete large amount of data from Oracle table ?</h3><p>Recently I faced this issue , I was running bulk insert query ,It was supposed to insert around 50 million record and I was committing once 1 million is getting inserted . So after inserting 20 million my script got failed and 20 million record got committed in the table . But my goal was to insert all 50 million records . Now I had to delete that 20 million records from the table and correct the query and run the bulk insert again. How to do this ?</p><p>First I tried running simple delete query by identifying the records that I needed to delete like below:</p><p>delete from &lt;table name&gt; where column1=’value’ and column2=’value’;</p><p>But this query ran for some time and gave this error :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*MX4UvcuH_1AFE9xhfbNMeg.png" /></figure><p>Now I had two options, first call dba team to extend the table space and 2nd try some different ways .So I choose to find a way by doing some google. Now I am going to explain how I deleted those records without extending tablespace :</p><ol><li>create a backup table using below query:</li></ol><p>create table DROP_TEST as (select id from &lt;table name&gt; where column1=’value’ and column2=’value’)</p><p>2. Run the delete query on actual table using DROP_TEST table like below:</p><p>delete from &lt;table name&gt; where id in (select dt.id from DROP_TEST dt where ROWNUM between 1 and 2000000);</p><p>This query did the magic and all the affected records got deleted in few minutes. There is one more verity of the query that we can try like:</p><p>First select ROWNUM between 1 and 200000 and once that got completed. select from 200000 to 400000 and so on.</p><p>This is one of the good problems that I faced recently so thought of sharing it with everyone. Happy Learning!! Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d83a3f431b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Difference between @service and @repository annotation in spring boot?]]></title>
            <link>https://medium.com/@mktechm/difference-between-service-and-repository-annotation-in-spring-boot-bc260f49a3a1?source=rss-b490575212ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc260f49a3a1</guid>
            <dc:creator><![CDATA[Manoj Pandey]]></dc:creator>
            <pubDate>Sat, 23 Oct 2021 12:29:39 GMT</pubDate>
            <atom:updated>2021-10-23T12:29:39.284Z</atom:updated>
            <content:encoded><![CDATA[<h3>Difference between @Service and @Repository annotation in spring boot?</h3><p>This is very popular interview question in spring boot .Here I have tried to explain how we can answer this question in interview .</p><p>To understand the difference we should know the purpose of @Component annotation in spring . This is a stereotype annotation. When we mark any bean with @Component annotation then spring picks that bean and register in ApplicationContext and that bean becomes spring managed bean. Now we can inject theses beans wherever we want in the application without writing any explicit code .</p><p>Now question comes if we have @Component annotation then what is the use of these @Service and @Repository annotations..</p><p>These @Service and @Repository annotations internally uses @Component annotation only for scanning and autodetecting the beans .Like in below picture you can see that the Service annotation is internally using Component annotation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FlJek10T33f8d3bUscS20w.png" /><figcaption>@Service annotation interface</figcaption></figure><p>But if I talk about @Repository annotation , It does the same but it also helps us to achieve the exception translation feature so that Spring will wrap up any exception thrown by your persistence layer with a DataAccessException. As we can see in below picture ..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XS_T3pY60bHWgAHmw00CQg.png" /><figcaption>@repository Annotation interface</figcaption></figure><p>That is the only difference between between @service and @repository annotation so don’t get confuse when interviewer ask to differentiate between @service and @repository or between @controller and @repository. Thanks and happy learning .Stay connected for more such content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc260f49a3a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5+ Years experienced Java coding interview questions]]></title>
            <link>https://medium.com/@mktechm/5-years-experienced-java-coding-interview-questions-4470b1a17330?source=rss-b490575212ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/4470b1a17330</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[java-interview-questions]]></category>
            <category><![CDATA[java-coding]]></category>
            <category><![CDATA[coding-interviews]]></category>
            <dc:creator><![CDATA[Manoj Pandey]]></dc:creator>
            <pubDate>Sun, 17 Oct 2021 06:19:11 GMT</pubDate>
            <atom:updated>2024-07-29T10:33:01.775Z</atom:updated>
            <content:encoded><![CDATA[<p>Here are some recurring coding interview questions that I have faced recently in my interview experience…</p><p>Disclaimer : These questions were asked in Service Based companies like TechMahindra, HCL, Wipro, TCS, Capgemini etc. Product based companies ask mostly DS and algo based questions so I will create a separate post for that.</p><ol><li>Given a string find out duplicate character and its count .</li></ol><p>Ex: i/p- ”manojpandey”, o/p- a-2,n-2.</p><p>This question has one more variant to find repeated word in the sentence .</p><p>Ex: I/O:“I am a java developer and I am proud of it ” , o/p: I-2,am-2.</p><p>2. Given a list of custom objects , sort the list based on various parameter of the object. Suppose you have list of employee object then sort the list based on name , salary etc. try to prepare this questions to solve using traditional way and using java 8 stream api.</p><p>3. Few common questions like -reverser a string without using inbuilt method, Fibonacci series, swap without using third variable, factorial problem , palindrome number problem. Sometimes interviewer ask these basic problem a to check logical skill so be prepared with these questions as well. I know I should not include these questions for experienced developer but I have faced these kind of questions and got embarrassed too, so to avoid that I am adding these questions.</p><p>4. Create a Deadlock situation programmatically. I have faced this question only once with Altron interview .</p><p>5. Reverse a linked list .</p><p>6. Find second largest number in an array? T</p><p><strong>Practice these problems also:</strong></p><p><em>1. Write a method to remove a given value from array list having string values.</em></p><p><em>2. Write a method to return the maximum value from an integer array passed as an input parameter.</em></p><p><em>3. Write a method to update the city attribute of Student object array list passed as an input parameter. If the city is “Mumbai” then change it to “Delhi”. The method should return how many student records were updated.</em></p><p><em>4. Write a method to check whether the strings passed as input parameters are made up of the same set of characters.</em></p><p><em>5. Write a method to remove duplicate values from an array list passed as an input parameter.</em></p><p><em>6. Write a method to return the second largest element in an integer array passed as an input parameter.</em></p><p><em>7. Write a method to reverse an integer array passed as an input parameter.</em></p><p><em>8. Write a method to return the odd numbers and their frequency from an integer array list passed as an input parameter. (</em><a href="https://medium.com/@mktechm/java-program-to-return-the-odd-numbers-and-their-frequency-from-an-integer-array-list-passed-as-an-4b67e081ee96"><em>Solution</em></a><em>)</em></p><p>Here I have included basic questions that we must prepare before appearing for any java interviews. These days interviewers are asking more coding questions from stream api so I am planning to create a separate post for stream api interview questions. So stay connected and if you want to add any questions that you have faced recently in any interview please let me know I will be happy to add here. Thanks and happy learning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4470b1a17330" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5+ Years experienced Spring boot and microservices Interview questions]]></title>
            <link>https://medium.com/javarevisited/5-years-experienced-spring-boot-and-microservices-interview-questions-9354e3cefee?source=rss-b490575212ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/9354e3cefee</guid>
            <category><![CDATA[microservice-architecture]]></category>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[java-interview-questions]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Manoj Pandey]]></dc:creator>
            <pubDate>Tue, 12 Oct 2021 06:05:40 GMT</pubDate>
            <atom:updated>2023-11-02T06:55:59.119Z</atom:updated>
            <content:encoded><![CDATA[<p>As promised in my previous post that I will share interview questions for advance topics like spring boot and microservices ,here are few questions that I encountered repeatedly in many interviews….</p><p><strong>Spring Boot:</strong></p><ol><li>Why to use spring boot? Difference between spring boot and spring MVC?</li><li>Difference between <a href="https://medium.com/@mktechm/difference-between-service-and-repository-annotation-in-spring-boot-bc260f49a3a1">@service and @repository annotation</a> ? @controller vs @RestController annotations ? Try to prepare and understand all the annotations which is being used in spring boot. Some time people ask to explain all the important annotations of spring boot.<a href="https://medium.com/@mktechm/difference-between-service-and-repository-annotation-in-spring-boot-bc260f49a3a1">(Answer)</a></li><li>Explain @SpringBootApplication annotation , this is very basic question but there are multiple follow up questions with this so try to understand this annotation internally .And sometime interviewer also ask the internal working of run() method in main method.</li><li>How have you done profiling in your spring boot application ? this question is basically to know that you have really worked on spring boot project. Although its very simple question but very important in terms of interview.</li><li>Implement saveEmployee() method in spring boot . Now a days interviewers try to check hands on by giving a small use case to implement like getEmployee() or saveEmployee() from controller to repository layer and in follow up they will ask to handle exceptions as well. So be prepared for exception handling scenarios in spring boot like how to use @ControllerAdvice and @ExceptionHandler annotations.</li><li>How to implement pagination using spring data jpa ?</li><li>How to change default server and port in spring boot ?</li><li>Difference between PUT and PATCH http methods ?</li><li>Difference between @RequestBody ,@RequestParam and @PathVariable annotations ?</li><li>Use of different http status code like 404,403, 401,500,502 etc .</li></ol><p><strong>Microservices:</strong></p><ol><li>What is microservices? All the microservices interview starts with this question . Its very simple but difficult to explain so be prepared with explanation about microservices architecture and you can also handle this question by explaining difference between monolithic and microservices architecture.</li><li>What will be your approach to migrate monolithic application to microservices ?</li></ol><p>3. Microservice Service A calls to Service B and Service B calls to service C ,if Service B is down or not responding then how to handle this situation in microservices ,Or which design pattern is suitable for this scenario ?</p><p>4. How to implement Service discovery and Api gateway for your microservices ? How eureka server works internally? There can be multiple follow up questions with service discovery like what is heartbeat in Eureka server? How one service get registered with Eureka server automatically? What is the default port of eureka server? How to turn off fetch registry from Eureka server ? And Why we need to turn off fetch registry from server side ? What is the significance of Api gateway in microservice. ?</p><p>5. How to implement distributed logging in microservices architecture.</p><p>6. How to handle transactions in microservices architecture?</p><p>7. At which layer we implement security in microservices ?</p><p>8. How to use feign client ?</p><p>Here I have added some spring boot and microservices questions that I have encountered recently , in next post I will try to create a post related to coding questions . Thanks and happy learning .</p><p>Other <strong>Spring Boot and Microservices articles</strong> yo may like:</p><ul><li><a href="https://medium.com/javarevisited/10-best-java-microservices-courses-with-spring-boot-and-spring-cloud-6d04556bdfed">11 Best Java Microservices Courses with Spring Boot and Spring Cloud in 2023</a></li><li><a href="https://javarevisited.blogspot.com/2021/09/microservices-design-patterns-principles.html">Top 10 Microservices Design Patterns and Principles - Examples</a></li><li><a href="https://medium.com/javarevisited/10-advanced-spring-boot-courses-for-experienced-java-developers-5e57606816bd">10 Advanced Spring Boot Courses for experienced Java Developers</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9354e3cefee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/javarevisited/5-years-experienced-spring-boot-and-microservices-interview-questions-9354e3cefee">5+ Years experienced Spring boot and microservices Interview questions</a> was originally published in <a href="https://medium.com/javarevisited">Javarevisited</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Year+ experienced Java Interview questions]]></title>
            <link>https://medium.com/@mktechm/5-year-experienced-java-interview-questions-5d87d249d3b0?source=rss-b490575212ad------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d87d249d3b0</guid>
            <category><![CDATA[java-interview-questions]]></category>
            <category><![CDATA[java8]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Manoj Pandey]]></dc:creator>
            <pubDate>Mon, 16 Aug 2021 18:14:39 GMT</pubDate>
            <atom:updated>2022-02-02T04:56:26.159Z</atom:updated>
            <content:encoded><![CDATA[<p>5 Year+ experienced Java Interview questions</p><p>I have around 7 years of experience in java development. Recently I started giving interviews to switch the company and after giving 5–6 interviews in different service based MNC I found that there are some questions which are repeating again and again so I though of creating a list that every experienced java developer can refer before appearing to java interview. Here I am adding only questions related to Core Java which is must for every java interviews:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V8ISZKH1KorlUCVrNkaC8Q.png" /></figure><ol><li>SOLID Design Principles with examples</li><li>Hash Map and ConcurrentHashMap internal working with follow up questions like collision resolution , equals and hash code scenarios.</li><li>Java 8 new Features: It includes all the new features like Functional Interface ,need of static and default methods with example, Optional,stream() vs parallelStream(), New Date Api, and few coding questions on steam.</li><li>ArrayList vs LinkedList ,when to use ArrayList and when to use LinkedList.</li><li>Singleton Design pattern with various scenarios like multi threading , using volatile keyword , breaking the Singleton , various ways of creating Singleton. Explore all the possibility of Singleton design pattern.</li><li>Create custom Immutable class . Custom Immutable class should be able to handle various scenarios like serialization ,cloning and having mutable member like List or Map.</li><li>Difference between Composition ,aggregation and association with example.</li><li>When to use interface vs abstract class in context with java 8.</li><li>Differemce between String ,Stringbuffer, Sringbuilder? Scenarios where these three classes get fit. And questions related to String constant pool.</li></ol><p>Here I have added the questions only but in my upcoming posts I will explain each topic in detail with real time examples. So stay connected..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d87d249d3b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>