Saturday, December 28, 2019

How to Create Online Courses for FREE in 2020

I have been telling my readers and fellow programmers to create an online course in 2020, and many of them have already started about planning their courses. Though, one question which keeps coming to me is how you can create an online course free? This is an obvious question, and after answering many of my readers over Facebook chats and emails, I decided to write a blog post about it so that everyone else who wants to create an online course for free without any investment except time and passion can benefit. Before answering this question, let me first congratulate you on making an excellent decision to create an online course, my typical win-win situation where everybody involved in this process wins.

Top 5 Courses to learn iOS and Swift in 2020 - Best of Lot

Hello guys, Happy New Year. It's that time of the year when we all start making our goals for better health, improving ourselves, and learn new things. Last Year, I focused mainly on the Web Development side and spent time teaching React, Angular, and Node JS, but this year, one of my goals is to explore the mobile world, particularly iOS and Android. At least that's a thought for now, and I am not sure how long I can go given the limited time I get to upgrade myself, but I'll try my best. Btw, if you also have the same goal and want to become an iOS developer in 2020, then you should start your journey by learning iOS 12, the latest version of Apple's Operating system which runs on iPhone and iPad and Swift 5, Apple's programming language for creating iOS apps.

Wednesday, December 25, 2019

10 Things Java Programmers Should Learn in 2020

It's 24th December now, and only a few days have left in the year 2019. It's an excellent time to look back and retrospect what you achieved in 2019 and what you could have done better. This will help you to create your goals for 2020. As a programmer, our biggest challenge is to keep ourselves up-to-date. Technology changes very fast, and you will see a new version of programming language and framework coming to every couple of years. This year has plentiful changes with keeping up-to-date with a new Java version every 6 months, Spring 5, Spring Security 5, and Spring Boot 2; it's probably the busiest year in terms of changes for Java developers.

Top 5 Books to Learn Python in 2020 - Best of Lot

Whether you are an AI expert or a Computer Science student, you will come across Python Programming language sooner or later in your career. Starting its journey in 1991, Python has now captured the Programming world. Started as just a scripting solution for trivial stuff, Python is now everywhere. With its excellent libraries and frameworks, Python is driving Data Science, Web Development, Machine Learning, Server Side development, Automation, and General Programming stuff, and that's why it makes sense to Learn Python. Unlike some programming languages like Java or C++, which is good for server-side and complex programs but not suitable for simple things, because of its excellent libraries and vibrant community, you can do almost everything using Python from object-oriented programming to writing simple scripts.

Monday, December 23, 2019

Udemy vs Pluralsight Review - Which is better to Learn to Code and Programming?

Hello guys, how are you doing? I am again back with answering one of the familiar doubts among online learners, Pluralsight, or Udemy? Which are the better websites for learning code and leveling up your programming skills? As a Java blogger and editor of a Medium publication, I often receive questions like this from my readers. Earlier I have answered questions like Pluralsight vs. CodeCademy and Udemy vs. CodeCademy but never explained about Pluralsight vs. Udemy, which many of my readers have been asking from a long time. Since Pluralsight and Udemy are two of the most popular online learning platforms and me also spend considerable time every day on each of them, I felt to write my review of Udemy and Pluralsight and explains pros and cons of both Udemy and Pluralsight so that you can make an informed decision when it comes to learning tech skills online.

Friday, December 20, 2019

10 Reasons to Learn Python Programming Language in 2020

If you are a regular reader of this blog, then you may be wondering why am I writing a blog post to tell people to learn Python in a Java blog? Didn't I ask you to prefer Java over Python a couple of years ago? Well, things have changed a lot since then. In 2016, Python replaced Java as the most popular language in colleges and universities, and since then, it has never looked back. Python is growing and growing big time. If you read programming and technology news or blog post, then you might have noticed the rise of Python as many popular developer communities, including StackOverflow and CodeAcademy has mentioned the growth of Python as a dominant programming language.

Wednesday, December 18, 2019

Top 5 Courses to Learn Spring Framework in Depth in 2020 - Best of Lot

Spring Framework is an essential skill for Java developers, not only to get a job as a Java developer but also for your career advancement. Since Spring is now used in almost every Java project, it becomes virtually mandatory to learn Spring framework. Now, the question comes, what is the best way to learn Spring framework? Are there any online courses out there that are focused on Spring? What are some good books and resources for learning Spring? These questions are widespread among Java developers, and I often see them on forums, online chat channels, and even many of my readers also ask this to me on Facebook chats and email. Well, the best way to learn any technology is by coaching, online courses, and books.

Tuesday, November 19, 2019

Top 10 Gift Ideas for Programmers, Software Engineers, and Tech Geeks

My friend circle has a lot of programmers and non-programmers. When it comes to buying gifts for birthdays, anniversary, or holidays, I receive a lot of queries from my non-programmer family and friends about what to buy for a programmer? Well, buying a gift is easy but choosing or finding the right gift for someone is really really tough. I have had this experience when it comes to buying gifts for kids. I know they like toys but my wife told me to buy something more valuable, which not only keeps them engaged but also provides value, help them in learning and they appreciate every time they use. That's a lot to cater to one gift, but that's the perfect gift, isn't it?

Top 10 UNIX and Linux System Programming Books- Best of Lot, Must Read

I have been sharing programming books in this blog for a long time, starting with core Java; I moved to other related technology, like Spring, Design patterns, Data Structure and Algorithms, etc. Today, I am going to share some of the best UNIX and Linux programming books. The list contains some of the must-read UNIX books from great writers like Sir Richard. Stevens, Sir Brain Kernighan, who has contributed so much to the development of the UNIX operating system. Most of the books on this list are timeless,  classic, and don't age with time, much like UNIX, which is around for the last 40 years, and I am sure it will be around for the next 40 years, or maybe forever.

Sunday, November 17, 2019

How to send HTTP request using curl and wget command from Linux and UNIX? Example Tutorial

You can use either curl or wget command to send HTTP requests from UNIX or Linux operating system. Both commands allow you to send GET and POST requests, which means you can also call REST web services.  I have a Java web application, which runs on Linux and exposes WebServices. I was writing a UNIX script to download In some data from that web service when I hit by the question, how do I make an HTTP call from UNIX? What is the UNIX command should I use? If you are also facing the same problem, then you have come to the right ht place. Basically, you can use two UNIX commands to make the HTTP request, wget, and curl.

Top 5 Books to Learn Scala and Functional Programming - Best of Lot

Scala is one of the relatively new programming languages which encompasses best practices of many programming languages. The biggest strength of Scala is that it provides a beautiful blend of object-oriented programming and Functional programming. So, you can not only construct elegant class hierarchies for maximum code reuse and extensibility, but you can also implement their behavior using higher-order functions. It has a concise syntax with less ceremony, which also makes it ideal for scripting but doesn't underestimate its power. Like Java, Scala has also used for mission-critical applications by technical giants like Twitter, LinkedIn, and Intel.

Friday, November 15, 2019

10 Example of find command in UNIX and Linux

The find command is one of the most versatile commands in UNIX and Linux, and I used it a lot in my day to day work. I believe having a good knowledge of find command in UNIX and understanding of its different options and usage will increase your productivity a lot in UNIX based operating system, e.g. Redhat Linux or Solaris. If you are a QA, support personnel, and your works involve lots of searching text on Linux machine or if you are a Java or C++ programmer and your code resides in UNIX, find command can significantly help you to look for any word inside your source file in the absence of an IDE.

Thursday, November 14, 2019

10 Example of lsof commands in Linux and UNIX

It's been a long time since I have written anything on UNIX or Linux commands. Still, today, I'll talk about the lsof command, a utility command every system admin and developers love. The lsof command stands for list open file descriptors, and as the name suggests, it is used to find open files by the process. Since almost everything in UNIX are file, you can use lsof command to find an open regular file, a directory, a symbolic link, a special block file, an NFS mounted file, a socket stream, a shared library, a special character file, a regular pipe, a named pipe, an internet socket, a UNIX domain socket, and many others. I have mostly used it to find all the files opened by a particular process, which I will show you in the next section.

Tuesday, November 12, 2019

10 JDK 10 Features Java Developers Should Know

Hello Guys, while we all are talking about Java 9 and some people are yet to adopt Java 8 in their projects, here comes the new release of Java, the JDK 10. It's available to download now on Oracle's website. This is the first release in the latest release schedule, where you have a new Java release every six months, I know it's quite early, but that's a reality now. Apart from 6 monthly release, Every 3 years there is an LTS release, which is sort of major Java release. The next LTS release is Java 11 which should be out in September. So you can aim for that. Then you can update three years after that to the next LTS release.

Monday, November 11, 2019

How to Enroll on Spring Professional Certification and Schedule Exam using Voucher Online - Step by Step Guide

So, you have been preparing for Spring certification for quite a sometime, and now you feel you are ready to take the exam, and it's time to buy the Spring certification voucher and schedule your exam. In this article, I'll show you how to buy the Spring certification voucher online. But, before purchasing a voucher, I would like to remind you that the Spring certification voucher is only valid for 90 days, after that it will expire. So, it's best to buy the voucher only if you are ready for the exam i.e. you have gone through several Spring Mock tests and practice tests given in Spring study guides and you are consistently scoring over 80% on them.

Sunday, November 10, 2019

How Spring MVC Framework works? How HTTP Request is processed?

One of the frequently asked Spring MVC Interview questions is about explaining the flow of web request i.e. how an HTTP request is processed from start to end. In other words, explaining the flow of request in Spring MVC. Since many of my readers ask this question time and again, I thought to summarize the flow of request processing in a short article. It all starts with the client, which sends a request to a specific URL. When that request hits the web container like Tomcat it looks into web.xml and finds the Servlet or Filter which is mapped to that particular URL. It the delegate that Servlet or Filter to process the request. Since Spring MVC is built on top of Servlet, this is also the initial flow of request in any Spring MVC based Java web application.

Saturday, November 9, 2019

find + du + sort + head command example in Linux - How to search large files and directories in host to free some disk space

Hello guys, 100% full disk space is a common problem and as a programmer or Linux user, you often need to free disk space by deleting biggest files and directories. In order to do that, you need to know some Linux find command examples to list and delete some biggest files and directories and that's what you will learn in this tutorial. As a Java developer, you also need to also support your application, most of which mostly run on Linux machines. Though production is monitored by the dedicated support teams and they receive regular alerts on the status of file system space, they often come running to you or the developer responsible about what to do when disk space is almost full or reaching 100%.

Thursday, November 7, 2019

Do you Need to Pass OCAJP before taking OCPJP - Core Java Certification from Oracle

Even though we now have Java 11 certification, I know many Java developers who are going for Java certification like Java SE 8 Programmer 1 and 2, also known as OCAJP 8 and OCPJP 8 with exam code 1Z0-808 and 1Z0-809. Even though Oracle split Java certification into 2 after acquiring Sun Microsystem in 2010, there is still confusion among Java developers whether they need to pass just one OCAJP exam or both OCAJP and OCPJP exam to become a certified Java developer. Well, The short answer is Yes, if you want to become a Java certified engineer then you need to pass both OCAJP and OCPJP, but the long answer depends upon your situation, e.g. whether you hold any previous Java certification or not, which we'll discuss in the second section.

Wednesday, November 6, 2019

Top 5 Books for Programming/Coding Interviews - Best of lot

If you are preparing for Programming Job interviews and looking for some of the best books for programming questions, then you have come to the right place. In this article, I am going to share a couple of good books to prepare coding, software design, and data structure algorithm questions, which are essential for any coding interviews. Though a programming interview also explores other areas of software development, e.g., the programming language, you would be mainly used in your project, like, C++ or Java. The database and SQL based questions, the operating systems, and UNIX related questions, some of the software design and object-oriented design pattern questions, and much more, but coding based questions form the core of programming interviews.

Monday, November 4, 2019

How do you find length of a Singly Linked list using Loop and Recursion

Hello guys, here is one of the classical programming questions how do you find the length of a linked list using recursion and without recursion. This is not about the LinkedList class of Java API but the linked list data structure, which is made of nodes that contain both data and address of the next node. In order to calculate the length, you need to count all nodes in the linked list. Since it's a singly linked list you can only move in one direction from the head to tail.  This coding problem was asked to me on my first interview with a multinational Investment bankAfter that, this question has been asked to me on several occasions in other Programming Job Interviews as well.

Top 5 Websites to Learn Python Coding for FREE - Best of Lot

Believe it or not, but Python has inspired many people to learn to code and its continually inspiring them. I know a handful of people who are learning Python for different reasons, starting from web development to machine learning. I have seen new people learning Python to write web apps using Django, create a Machine learning Model using Python, and just to write some handy scripts to automate the boring stuff. Python is currently the world's #1 programming language and its popularity is growing every passing day, thanks to Data Science and Machine learning and awesome Python libraries like Pandas, NumPy, and TensorFlow.

Saturday, November 2, 2019

5 Websites to Learn SQL Online for FREE

The SQL is one of the most important skills for any programmer be it a Java, C++, Python, JavaScript, or Ruby developer. Almost 95% of the Java applications use a relational database in their back-end and almost all web applications use the database. In recent years, one of the most common way to learn any programming skill is online, at your comfort of the office or home and SQL is no different. Learning SQL online has another advantage of a quick head start because you don't need to install a database and create tables to write some SELECT queries. The installation and setup is definitely a tough part for beginners and I have gone through that pain every time I have to learn a new database.

Thursday, October 31, 2019

When to use intern() method of String in Java?

The String.intern() method can be used to deal with the String duplication problem in Java. By carefully using the intern() means you can save a lot of heap memory consumed by duplicate String objects. A String object is said to be duplicate if it contains the same content as another string but occupied different memory location e.g. str1 != str2 but str1.equals(str2) is true. Since String object consumes a large amount of heap memory in average Java application, it makes sense to use the intern() method to reduce duplication and take advantage of String pool feature provided by Java. You can use intern() method to intern a String object and store them into String pool for further reuse.

Wednesday, October 30, 2019

How to use EXISTS Clause in SQL? A Real World SQL Query Example using EXISTS

Hello Guys, you might have heard about how useful the EXISTS clause is helpful in writing sophisticated queries. Still, at the same time, I have also seen that many programmers struggle to understand and use EXISTS and NOT EXISTS clause while writing SQL queries.  If you are one of them, then you have come to the right place. Today you will learn how to use the EXISTS clause in SQL by picking up a real-world example and an excellent SQL exercise from the LeetCode. Suppose that a website contains two tables, the Customers table, and the Orders table. Can you write an SQL query to find all customers who have never ordered anything?

Sunday, October 27, 2019

What is the best Book to Learn Java for C and C++ Programmer?

In the last 2 decades, many Java programmers started programming with C and C++, but the situation is changed now, you have more choices like you can choose Python, or you can even start with Java. It seems Academia prefers Python in the USA and Java in India, but there are still many programmers who know C and C++ and want to learn Java for one or other reasons. I often receive emails from my readers about book recommendation, and recently, a couple of them asked me to suggest the best Java books for C and C++ programmers. I can relate those beginners to myself because I have also gone through the same phase, but those days, the university textbooks are our only source to learn new things. We didn't have broadband, and unlimited access to the Internet and eBooks was not popular at that time, but things have changed.

Sunday, October 20, 2019

How to implement Command Design Pattern in Java with Example

Hello guys, it's been a long since I have shared a Java design pattern tutorial. I did share some courses to learn design patterns but haven't really talked about a particular design pattern in depth. So, today, we'll learn one of the important design pattern, which is often overlooked by Java developers. Yes, I am talking about the Command Pattern which can help you write flexible, loosely coupled code for implementing actions and events in your application. In simple words, the command design pattern is used to separate a request for an action from the object which actually performs the action. This decoupling between Invoker and Receiver object provides a uniform way to perform different types of actions. This decoupling is achieved using a Command object, which is usually an interface with methods like execute()

Friday, October 18, 2019

Difference between StringJoiner vs String.join in Java 8 with Examples

Joining multiple String literals or object into one is a common programming requirement and you will often find situations where you need to convert a list of String or a Collection of String into a CSV String for your application. For a long time, JDK API has no way to join multiple String literals or objects together, which forces programmers to write hacks like looping through all String objects and manually joining them using String concatenation to create the final, joined String. Even though this approach worked, it was filled with errors and hacks like you need to be careful not to add delimiter before the first element and after the last element, which often caused issues, particularly in case of beginners and junior Java developers.

Wednesday, October 16, 2019

What is a Functional interface in Java 8? @FunctionalInterface Annotation Examples Tutorial

The Functional interface is one of the most important concepts of Java 8 which actually powers lambda expression but many developers don't put enough effort to understand it and spend time learning lambda expression and Stream API without first understanding the role of the functional interface in Java 8. Unless you know what is a functional interface and how lambda is related to it, you can't use powerful features of Java 8 like Lambda expression and Stream API. Without knowledge of functional interface, you won't be able to understand where you can use a lambda in the code but also you will struggle to write lambda expression the method is expecting, hence, it's important to have a good understanding of functional interface in Java 8.

Tuesday, October 15, 2019

How to Convert a Lambda Expression to Method Reference in Java 8?

If you have been coding in Java 8 then you may know that using method reference in place of lambda expression makes your code more readable, hence it is advised to replace lambda expression with method reference wherever possible. But, the big question is, how do you find whether you can replace a lambda with method reference? Yes, it's not that easy, especially if you have been using Java 8 only for a couple of months and struggling to get the functional programming concepts and idioms sorted in your head. Sometimes, IDEs like IntelliJ IDEA and Eclipse does offer some hints to convert lambda expression to method reference but it does make sense to learn the logic behind it, otherwise, it won't make sense.

Saturday, October 12, 2019

The OCAJP 1Z0-808 - Best Books and Mock Exams for Java 8 OCA Certification

From the last couple of months, I have been helping a few developers to prepare for Java 8 associate certification with exam code 1Z0-808, also known as OCAJP 8. From my experience, both for preparing for Sun certification and helping other developers to get Java certified, I can say that two keys to be successful in Oracle Java SE certification are choosing an excellent study guide/course and buying one or two top quality mock exam simulators. When I say success, it doesn't mean just passing the exam but scoring above 90% because passing score 65% is not very difficult to achieve and anybody can pass OCAJP 8 by just a couple of month of practice but to score 90% and above is not that easy, you need to prepare and prepare hard.

Wednesday, October 9, 2019

How to implement Binary Search in Java without Recursion - Iterative algorithm

This week’s task is to implement a binary search in Java, you need to write both iterative and recursive binary search algorithm. In computer science, a binary search or half-interval search is a divide and conquer algorithm which locates the position of an item in a sorted array. Binary search works by comparing an input value to the middle element of the array. The comparison determines whether the element equals the input, less than the input or greater. When the element being compared to equals the input the search stops and typically returns the position of the element. If the element is not equal to the input then a comparison is made to determine whether the input is less than or greater than the element.

5 Free Data Structure and Algorithms Books in Java Programming

In the last article, I have shared some of the best data structure and algorithms books for programmers, but those were not free. After that article, I received some feedback about how about sharing free data structure and algorithm books? Fair enough, everybody loves free eBooks, courses and PDFs, don't you? In the past, I have shared a list of free Java programming books, so I had some idea. I did some more research on the internet and checked my collection as well. Fortunately, there are a couple of good Data Structure and Algorithm books which are available for free as a PDF download or for online reading, which is what I am going to share with you all today.

Tuesday, October 8, 2019

How to find the 3rd (kth) Node from end or tail in a linked list in Java

Hello guys, the problem to find the 3rd element from the end in a singly linked list or Kth node from the tail is one of the tricky but frequently asked linked list problems in Programming job interviews. I know you can easily solve this problem by moving from tail to head or in the reverse direction but the main challenge here is to solve the problem in just one pass. That means, you can not traverse the linked list again and you cannot traverse backward because it's a singly linked list. So what do you think? Isn't this problem challenging? Well, I did struggle when I saw this problem very first time but once you understand the logic and some tricks to solve a linked list based problem like Recursion then it would be easy for you, and that's what you will learn in this article.

Sunday, October 6, 2019

2 Ways to Check if a String is Rotation of Other in Java - Algorithms

Write a program to check if one String is a rotation of another String is a common coding problem you will find on programming job interviews.  A String is said to be a rotation of another String, if it has the same length, contains the same characters, and they were rotated around one of the characters. For example,  String"bcda" is a rotation of "abcd" but "bdca" is not a rotation of String "abcd". One of the simplest solutions to this interesting problem is first to check if two String has the same length, if not then one String cannot be the rotation of another. If they are of the same length then just create another String by concatenating first String with itself, now check if second String is a substring of this concatenated String or not, if yes, the second String is a rotation of first.

Friday, October 4, 2019

Top 5 Books to learn REST and RESTful WebServices for Java Programmers

The REST framework has now become the standard way to develop Web Services on the Internet. It's no more SOAP, who used to rule the world for the last two decades. The SOAP and XML went very well together in the past decade but it seems now REST and JSON have overtaken then and doing even better, thanks to the rise of JavaScript for both frontend and backend development. Since Java is also one of the most popular languages to develop backend services, there is a lot of demand for Java developers who know web services and can implement and expose existing SOAP-based services into REST style, light-weight web services.

Thursday, September 26, 2019

Top 10 Free Courses to Learn Python in Depth - Best of Lot

There is no doubt that Python is currently the world's #1 programming language and the biggest advantage of that is it's bringing more and more people into the programming world. In recent years, I have seen more people learning Python than any other languages, yes, not even JavaScript. Many of them learning Python to explore some awesome Data Science and Machine learning libraries provided by Python. Some people are also learning Python for web development and there are still many developers who are learning Python for scripting and automating trivial tasks. It doesn't matter why you are learning Python at this moment, it's a great thing in itself that you have decided to learn Python.

Tuesday, September 24, 2019

Clean Code by Uncle Bob - Book Review - Must read for Software Engineers

Even though the Clean Code book was released many years ago and there are lots of good reviews already available, I couldn't resist to write my own experience of this great book. I came across this book many years ago, but since then, I have read it multiple times, and I have recommended it to my readers, students, and fellow developers. It is one of those books which make you feel that why didn't you come across it earlier, I felt the same when I first learned about this book. The Clean Code is all about writing good quality code, and how do you judge the quality of code? Well, you won't appreciate good until you have seen bad code and that's what this book does.

Tuesday, September 17, 2019

Why Every Programmer or Blogger Should Teach Online and Create Courses

I often receive queries like should programmers create an alternative source of income, or should programmers create their own blog or website? Both are fundamental questions, and there was a time when I advise programmers to create their own blog, not just to learn and improve their understanding of the technology they know, but also to earn money while doing things you love, but time has changed. Now I advise Programmers and Software Developers to create and sell online courses on Teachable, ThinkificUdemy, or any other platforms. The reasons are still the same, you learn and earn, but the method has been changed. A blog is always an excellent way to establish yourself online, but it requires a lot more effort and time to earn something meaningful.

Wednesday, September 4, 2019

How to parse JSON with date field in Java - Jackson @JsonDeserialize Annotation Example

I have read many articles on parsing JSON in Java and most of them give examples where properties are either String or int, there are very few examples, where you will see the JSON string contains a date field and that's one important thing to learn. It's easy to parse JSON in Java using Jackson or Gson with just integer and string field but you need to do a little more work if your JSON contains a date field because everything in JSON is String but Java is a type based programming language, where Date is a type.

Tuesday, September 3, 2019

How to Ignore Unknown Properties While Parsing JSON in Java

One of the common problem while parsing JSON in Java using Jackson API is that it fails when your JSON contains unknown properties i.e. your Java class doesn't have all the field corresponding to all JSON properties. For example, if you are consuming JSON from a REST Web Service and tomorrow they added a new field into JSON then your code will break because Jackson will throw UnrecognizedPropertyException and stop parsing JSON. This is troublesome and can cause problems in production if you are not aware. I  have faced this issue when a developer shipped the code to consume data from REST API without proper handling unknown fields.

Saturday, August 17, 2019

Java 8 Certifications - Oracle Java SE 8 Programmer 1 (1Z0-808) - Latest OCAJP Exam (OCP 11 1Z0-815 and 1Z0-816)

Update: The latest version of Java SE certification is now OCAJP 11 (1Z0-815) and OCPJP 11 (1Z0-816) which is based upon Java 11 version. You can take these two exams to become a certified Java 11 developer, but if you already have an Oracle Certified Professional Java Programmer for the Java 6, 7, or 8 versions, then you can take the upgrade OCP Java 6, 7, and 8 to Java SE 11 Developer exam (Exam Code 1Z0-817). I don't have much detail, so I still keep this post as it is, but once I have got more information. I will also update this post. Today one of my readers asked about what is the latest OCPJP or SCJP exams available and is there a Java certification available for Java SE 9 and Java SE 10?

Wednesday, August 14, 2019

Top 22 Spring Interview Questions Answers for Java JEE Developers

Spring framework interview questions are on the rise on Java EE and core Java interviews Spring, which is obvious given Spring is the best framework available for Java application development and now Spring IOC container and Spring MVC framework are used as a de-facto framework for all new Java development. Because of its popularity,  interview questions from spring framework are top on any list of Core Java Interview questions. I thought to put together some spring interview questions and answers which have appeared on many Java and J2EE interviews and useful for practicing before appearing on any Java Job interview. I first wrote this article a long back and even its content is still relevant I thought to update it, especially after finishing my list of Spring Boot Interview Questions recently.

Thursday, August 8, 2019

Grammarly Review - Why Every Blogger Should use - My Writing Assistant, Proofreader, and English Tutor

Hello guys, today, I am going to share my review of Grammarly - one of the powerful writing tools for bloggers, programmers, writers, students and anyone who wants to write correct English without grammatical and spelling mistakes. I have regularly been blogging since 2010 and have written more than 1000 articles on Java, Programming, and Technology, but didn't talk much about blogging itself. After many requests from my readers for blogging tips, my experience, and what should a programmer do for his improvement and financial stability, I have decided to write occasional posts about my blogging experience, and this one is first on that series. In this article, I am going to share one of the essential tools for any blogger or writer - Grammarly, a software which helps you with your writing. It not only corrects spelling and grammar mistakes in your article but also provides useful insights about readability, engagement, clarity, and delivery of your article.

Monday, August 5, 2019

How to write a C like Sizeof function in Java?

If you have just started learning Java and came from C background then you might have noticed some difference between Java and C programming language, e.g., String is an object in Java and not a NULL-terminated character array. Similarly, there is is no sizeof() operator in Java. All primitive values have predefined size, e.g., int is 4 bytes, char is 2 byte, short is 2 byte, long and float is 8 byte, and so on. But if you are missing sizeOf operator then why not let's make it a coding task? If you are Ok, then your next job is to write a method in Java, which can behave like sizeOf() operator/function of C and returns the size in bytes for each primitive numeric type, i.e. all primitive types except boolean.

Sunday, August 4, 2019

Top 6 Books to Learn and Master Programming and Coding - Must Read, Best of Lot

Coding is an integral part of Programming, and we all somehow learned to code by following examples here and there. Yes, I am talking about both self-taught programmer and Computer Science Graduates. You can learn Coding easily if you are dedicated, but what is more difficult is to write good code. You can easily find programmers in Java, C++, Ruby or Python, but finding programmers, who are also a good coder is very difficult. Some universities have a good curriculum and practical classes to teach coding better than others, but most of these great coders are self-taught Programmers, who learned by reading books, joining online courses and doing things on their own.

Monday, July 29, 2019

Why become a Certified Java Programmer? Does Oracle Certified Professional Earn more?

I have seen many Java programmers in doubt whether to go for Java certifications or not? Whether getting Java certified will help them to earn a better salary? or after becoming Java certified from Oracle will help them to get a Job. In this article, we will see what the benefits of getting Java certified are. I know higher income, better job prospects, and a better chance of promotion is at the top of the benefits of becoming a certified Java professional, but this certification provides much more value than that. Apart from all those tangible benefits, the most important thing is that you learn Java better, which help you everywhere like in your day job as well as on interviews.

Friday, July 26, 2019

How to limit number of concurrent session in a Java web application using Spring Security?

If you don't know, Spring security can limit the number of sessions a user can have in a Java web application. If you are developing a web application especially a secure web application in Java JEE then you must have come up with the requirement similar to many online banking portals have like only one session per user at a time or no concurrent session per user. If the user tries to open a new session then either an alert is shown or his previous session is closed. Even though you can also implement this functionality without using spring security but with Spring security, it's just a piece of cake with coffee :). 

Tuesday, July 23, 2019

3 Ways to convert String to Boolean in Java? Examples

You can convert a String object to Boolean object or boolean primitive by using the Boolean.valueOf() and Boolean.parseBoolean() method. The steps are similar rot converting to String to other data types e.g. String to Integer and String to Long. You can use valueOf() method to convert String to Boolean object and parseBoolean() method to convert given string to a boolean primitive value. Internally, valueOf() also uses parseBoolean() for parsing String but on top of that it also provides caching e.g. it can return Boolean.TRUE and Boolean.FALSE cached value for "true" and "false" string. 

Sunday, July 21, 2019

How to fix invalid target release: 1.7, 1.8, 1.9, or 1.10 Error in Maven Build

If you are building your Java project using Maven, maybe in Eclipse or from the command prompt by running mvn install and your build is failing with an error like "invalid target release: 1.7" or "invalid target release: 1.8" then you have come to the right place. In this article, I'll show you the reason why this error occurs and how you can deal with these errors even with higher Java version like Java 9, 10 installed on your machine, or maybe with Java 11 in the coming month. The root cause of the problem is that you have specified a higher Java version in your pom.xml file for Maven compiler plugin then what Maven knows in your system, and that's why it's saying invalid target release.

Friday, July 19, 2019

A Better way to write Complex SQL queries for Programmers

There is no doubt that writing code is more art than science, every coder cannot write beautiful code which is both readable and maintainable, even with experience. In general, coding improves with experience when you learn the art of coding e.g. favoring composition over inheritance or coding for interface than implementation, but only a few developers able to master these techniques.  Same applies to SQL queries. The way you structure your query, the way you write it goes a long way to communicate your intent to the fellow developer. When I see SQL queries on emails from multiple developers, I can see the stark difference in their writing style.

Thursday, July 18, 2019

Top 10 Java 11 Certification Mock Tests and Practice Questions | (4 Free OCAJP 11 - 1Z0-815 and OCAPJP 816 Sample Questions)

The latest Java certification is now out, the Java 11 Certification. Ever since Java 9 and Java10 were out, programmers were speculating that what will happen to Java certification now? Will there is, be a new Java 9 certification or Java 10 certification? Will there be a new Java certification every 6 months, following the Java SE release cycle? Well, Thankfully, nothing of that sort happened; a new Java certification every six months would have been a crazy idea, not just for students and programmers but also to all the party involved, including Oracle itself.  Now the big question is what has been changed in Java 11 certification, and should you go for OCAJP 8 or OCAJP 11 certification?

Sunday, July 14, 2019

Amazon Prime Day 2019 - Best Tech Deals - What Programmers and Tech People Can Buy?

Many of my friends and colleagues used to wait until November to buy books, gadgets, and other computer items to get the huge discount offered on Black Friday and Cyber Monday deals, but you don't need to wait that long. Amazon is bringing Black Friday to the summer with their annual Prime Day offers. The Amazon Prime day is nothing but a one-day (precisely one and half-day and this time full two-day) shopping extravaganza, where you will get huge discounts on thousands of Amazon products including books, games, gadgets, and other computer and electronics items. So, if you are looking to buy a new laptop, a new smartphone or some fitness gadgets and watch than this is an awesome opportunity. 

Saturday, July 13, 2019

Bucket Sort in Java with Example - How Algorithm Works

In recent years, one of the questions I have increasingly seen in programming job interviews is about constant time sorting algorithms like do you know any O(n) sorting algorithm? how do they work? When I first encountered this question, I had no idea whether we can sort in constant time because even some of the fastest sorting algorithms like QuickSort or MergeSort takes O(N log N) time for sorting on their average case. After some research, mainly by going through the classic CLRS book and this DS and Algorithms course by Tim Buchalka and Goran Lochert on Udemy, I come to know that there indeed are some constant time or linear time sorting algorithms like bucket sort, counting sort, and radix sort, which can sort an array in O(n) time but they work with only a special set of input.

Friday, July 12, 2019

2 Ways to setup LDAP Active Directory Authentication in Java - Spring Security Example Tutorial

The LDAP authentication is one of the most popular authentication mechanism around the world for enterprise application and Active directory (an LDAP implementation by Microsoft for Windows) is another widely used LDAP server. In many projects, we need to authenticate against active directory using LDAP by credentials provided in the login screen. Sometimes this simple task gets tricky because of various issues faced during implementation and integration and no standard way of doing LDAP authentication in a Java web application. Even though Java provides LDAP support but in this article, I will mostly talk about spring security because of it's my preferred Java framework for authentication, authorization, and security-related stuff.

Thursday, July 11, 2019

How to enable HTTP Basic Authentication in Spring Security using Java and XML Config

In the last article, I have shown you how to enable Spring security in Java application and today we'll talk about how to enable Basic HTTP authentication in your Java web application using Spring Security. I'll show you how to do that using both the Java configuration and XML configuration if you are using Spring Security 3.1 or lower version, but before that let's understand what is Http basic authentication and why do you need that? One of the most common ways to authenticate a user in a web application is by using form login like you provide a login page and user will enter his username and password for authentication. This works great for human users but sometimes there are situations where you can't use a login form for authentication.

Tuesday, July 2, 2019

Spring Framework Certification FAQ - Frequently asked Questions Answers for Java Developers

If you are a Java developer, working in Spring framework and thinking to become a certified Spring professional but couldn't to do it in the past due to expensive mandatory training provided by Pivotal and its partners then there is a good news for you. From 10th May 2017, Pivotal made the Spring Core training optional for appearing to Spring certification exam, which means, now, it's not mandatory to take Spring training for Spring certifications (see here). Similar to Oracle's Java certifications, you can become a Pivotal certified Spring Professional by just buying the exam vouchers and scheduling your exam online using examlocal.com from anywhere in the world.

Monday, July 1, 2019

How Spring MVC Makes Easy to Create RESTful Web Services in Java

REST has now become a standard way to develop web services and when it comes to Java, there are many frameworks and libraries available e.g. JAX-RS, Restlet, Jersey, RESTEasy, Apache CFX etc, but I encourage Java developers to use Spring framework to develop RESTful web services. But, some of you might ask, why use Spring Framework to develop RESTful web services in Java? What is the advantage and why it's better than other frameworks and libraries available out there? Well, the most important reason I think to use Spring for developing RESTful web service is that you can use your Spring MVC experience to develop RESTful web services.

Wednesday, June 26, 2019

What is SecurityContext and SecurityContextHolder in Spring Security?

The SecurityContext and SecurityContextHolder are two fundamental classes of Spring Security. The SecurityContext is used to store the details of the currently authenticated user, also known as a principle. So, if you have to get the username or any other user details, you need to get this SecurityContext first. The SecurityContextHolder is a helper class, which provides access to the security context. By default, it uses a ThreadLocal object to store security context, which means that the security context is always available to methods in the same thread of execution, even if you don't pass the SecurityContext object around. Don't worry about the ThreadLocal memory leak in web application though, Spring Security takes care of cleaning ThreadLocal.

Monday, June 24, 2019

The @SpringBootApplication annotation Example in Java + Spring Boot

Hello guys, today, we'll learn about the @SpringBootApplication annotation, one of the most important annotations from popular Spring Boot framework, which has changed the way Java developers use Spring framework for writing Java applications. In this article, I'll explain to you the meaning of @SpringBootApplication and it's used in a simple Spring Boot application. We use @SpringBootApplication annotation on our Application or Main class to enable a host of features e.g. Java-based Spring configuration, component scanning, and in particular for enabling Spring Boot's auto-configuration feature.

Thursday, June 20, 2019

Differences between @RequestParam and @PathVariable annotations in Spring MVC?

The Spring MVC framework, one of the most popular frameworks for developing a web application in Java world also provides several useful annotations to extract data from the incoming request and mapping the request to the controller, like @RequestMapping, @RequestParam, and @PathVariable. Even though both @RequestParam and @PathVariable is used to extract values from the HTTP request, there is a subtle difference between them, which makes them a useful question from an interview and spring certification point of view. We'll examine the subtle difference between @RequestParam and @PathVaraible in this article.

Sunday, June 16, 2019

Top 5 Free Git Courses for Programmers to Learn Online - Best of Lot

One of my goals in 2018 is to learn and master Git and I have been searching for some good tutorials and courses to start with. The Internet is full of git tutorials and a simple Google search will leave you thousands of tutorials but the big question mark is where do you start? It's easy to pick a tutorial or a blog post if you have some background about what is Git, what it does? and how to use it but if you don't have much background then you need a course which can tell you all the information from the ground up. I personally like learning from a book or an online course before moving to blog posts as they were often well structured. When you search for Git courses in popular online course websites like Udemy, Pluralsight or Coursera, you will find some good courses like Git Complete: The Definitive Guide on Udemy and Git Fundamentals from Pluralsight which will teach you everything about Git step by step. These are excellent resources to start with Git.

Wednesday, June 12, 2019

Binary Tree PreOrder Traversal in Java - Recursion and Iteration Example

Unlike a linked list and array which are linear data structure and can only be traversed linearly, there are several ways to traverse a binary tree because of its hierarchical nature. The tree traversal algorithms are mainly divided into two types, the depth-first algorithms, and breadth-first algorithms. As their name suggests, in a depth-first algorithm, the tree is traversed downwards (towards the depth) before the next sibling is visited, the PreOrder, InOrder and PostOrder traversal of a binary tree is actually depth-first traversal algorithms. On the breadth-first algorithm, also known as level order traversal, the entire breadth of the tree is traversed before moving to the next level, hence it is also known as level order traversal.

Tuesday, June 4, 2019

How to enable/disable an element using jQuery and JavaScript? Example

Sometimes we need to enable and disable input elements like text box, radio buttons, or checkboxes, but every time you make a change you need to reload the HTML? The question is, how can we do it dynamically without loading the page? Well, we can use JavaScript, particularly jQuery to do this. An element can be disabled in HTML by setting disable property to true and enabled again by setting disabled=false. By using jQuery, you can grab the element you want to enable or disable and change this property by using the prop() or attr() function, depending upon the version of jQuery you are using.

Sunday, June 2, 2019

How to Check/Uncheck CheckBoxes in a Page using jQuery? Example Tutorial

In the last couple of articles, I have shared a couple of useful jQuery tips like reloading web page and working with tag selectors. Today, I'll show you how to check or uncheck a particular checkbox using jQuery, one of the most popular JavaScript framework. jQuery provides CSS like selectors which can make this kind of task trivial. If you remember, in HTML a checkbox is checked if the "checked" attribute is present and its value is not false, otherwise, it's unchecked. By using jQuery function prop() you can dynamically add this attribute or if present we can change its value i.e. checked=true to make the checkbox checked and checked=false to mark the checkbox unchecked.

How to Sort a HashMap by Values in Ascending and Descending Order in Java 8 - Example Tutorial

In the last article, I have shown you how to sort a Map in Java 8 by keys and today, I'll teach you how to sort a Map by values using Java 8 features e.g. lambda expression, method reference, streams, and new methods added into the java.util.Comparator and Map.Entry classes. In order to sort any Map e.g. HashMap, Hashtable, LinkedHashMap, TreemMap, or even ConcurrentHashMap, you can first get set of entries by using the entrySet() method and then you can get the stream by calling the stream() method. The entrySet()  method returns a Set which inherit the stream() method from the java.util.Collection class. Once you got the stream, you can just call the sorted() method which can sort all Map.Entry objects available in Stream using a Comparator.

Tuesday, May 28, 2019

How to Create a thread-safe ConcurrentHashSet in Java 8? Example

Until JDK 8, there was no way to create a large, thread-safe, ConcurrentHashSet in Java. The java.util.concurrent package doesn't even have a class called ConcurrentHashSet, but from JDK 8 onwards, you can use the newly added keySet(default value) and newKeySet() methods to create a ConcurrentHashSet backed by ConcurrentHashMap in Java. This is better than old tactical solutions like using a concurrent hash map with dummy value or using the set view of the map, where you cannot add new elements. The Set returned by keySet(defaultValue) and newKeySet() methods of JDK 8 is a proper set, where you can also add new elements along with performing other set operations e.g. contains(), remove() etc.

Monday, May 27, 2019

What is the Use of DispatcherServlet in Spring MVC Framework?

If you have worked with Spring MVC then you should know what is a DispatcherServlet? It's actually the heart of Spring MVC, precisely the C of MVC design pattern or Controller. Every single web request which is supposed to be processed by Spring MVC goes through DispatcherServlet. In general, its an implementation of Front Controller Pattern which provides a single point of entry in your application. It handles all incoming requests. It is also the bridge between Java and Spring. Btw, the DispatcherServlet is like any other Servlet is declared in the web.xml with a URL pattern but the only special thing is that the URL pattern for dispatcher servlet is enough to map every single web request to DispathcherServlert.

Sunday, May 26, 2019

Top 5 Node.js and Express JS online courses for Web Developers

There is no doubt that JavaScript is the #1 Programming language in the world and Node.js is one of the biggest reason for that. Initially, JavaScript was considered just a client-side scripting language but Node.js has changed all that by allowing developers to create dynamic web pages on the server side using JavaScript. It is also rated as the most popular framework of 2017 on StackOverflow Developers survey. The most important benefit of Node.js is that it allows you to build a full stack application based on just one language, JavaScript. This is especially useful for start-ups which put a lot of emphasis on being able to iterate early and often.

Friday, May 24, 2019

Difference between @Autowired and @Inject annotation in Spring?

What is the difference between @Autowired and @Inject annotation in Spring is one of the frequently asked Spring questions on Java interviews? Since everybody is now moved or moving to annotation-driven and Java configuration in Spring, this question has become even more important for prospective candidates looking for a Java web development job using Spring framework. The @Autowired annotation is used for auto-wiring in Spring framework. If you don't know, autowiring is a process on which Spring framework figure out dependencies of a Spring bean, instead of you, a developer, explicitly specifying them in the application context file. You can annotate fields and constructor using @Autowired to tell Spring framework to find dependencies for you.

What is the Role of InternalResourceViewResolver in Spring MVC? Interview Question

Earlier, I have explained to you about how Spring MVC works internally and how it process HTTP request coming to your web application. One of the important parts of that processing was view resolution, which is handled by the ViewResolver interface. In this article, you'll learn more about it by explaining the InternalResourceViewResolver class. The InternalResourceViewResolver is an implementation of ViewResolver in Spring MVC framework which resolves logical view name e.g. "hello" to internal physical resources e.g. Servlet and JSP files e.g. jsp files placed under WEB-INF folder. It is a subclass of UrlBasedViewResolver, which uses "prefix" and "suffix" to convert a logical view name returned from Spring controller to map to actual, physical views.

Tuesday, May 21, 2019

How to find all Checked checkboxes in jQuery? Example Tutorial

Hello guys, suppose you have multiple checkboxes in your HTML page and you want to retrieve all checkboxes which are checked? How will you do that in jQuery? Well, you can use the pseudo selector like :checked to get all checked checkboxes. This selector checks for the checked property of checkbox and returns only those checkboxes which have this property. For example, following jQuery selector will return all the checkboxes which are checked:

$('input[type=checkbox]:checked')

In this, we are first selecting all input elements where type is a checkbox and then adding: checked to filter only those which are checked.

Monday, May 20, 2019

Top 10 ConcurrentHashMap Questions from Java Interviews

The ConcurrentHashMap class part of concurrent collections package added on JDK 1.5 which contains utility classes like BlockingQueue, CopyOnWriteArrayList, CopyOnWriteArraySet etc. It is a replacement of synchronized hash-based map implementations e.g. Hashtable and synchronized HashMap. It implements Map and ConcurrentMap (a sub-interface of Map) interface which allows you to store key-value pairs. The class is similar to HashMap or Hashtable but it's more scalable and the right fit for concurrent Java application. Unlike Hashtable which achieves its thread-safety by compromising the scalability, ConcurrentHashMap uses advanced techniques e.g. dividing the map into segments to remain thread-safe and scalable at the same time.

Saturday, May 18, 2019

Entuware or Whizlabs? Which Exam Simulator Should you Buy for Java Certifications (OCAJP, OCPJP, and Others)?

I often receive queries from Java certification aspirants about exam simulators like whether should I go for Whizlabs or Enthuware, which one is better? If I have to buy just one exam simulator, which one would you recommend, Whizlabs or Enthuware? I thought to answer all those questions in a blog post and here you go. To be honest with you both of them are really high-quality test simulators and whichever you buy, you will do well on actual exams. But, as a programmer, I really like to analyze the situation, I compare pros and cons of each of them before I buy one of them. Since I have used both of them in the past I am sure about that in quality, they are neck to neck there, but here are couple of things which you can consider before buying Java certification simulator from Whizlabs or Enthuware

Thursday, May 16, 2019

Java 9 Example - Factory Methods for Collection - Creating Unmodifiable List, Set, and Map

Hello guys, this is my first article in Java 9 features on this blog and today you'll learn about my favorite feature "factory methods for collection", which is introduced as part of JEP 269. The JEP stands for JDK enhancement proposal. If you have worked in Groovy or Kotlin then you know that how easy is to create the list with elements using collection literals e.g. to create a list of 1, 2, 3 you can simply write val items = listOf(1, 2, 3). Unfortunately, Java doesn't support that yet but things have been improved with the factory methods for collection in JDK 9 and it's almost like that. JDK has added static factory methods like of() on to basic Collection interfaces which you can use to create a list of items.

Tuesday, May 7, 2019

How to declare and initialize a List (ArrayList and LinkedList) with values in Java - Arrays.asList() Example

Hello guys, today, I am going to share with you a useful tip to initialize a List like ArrayList or LinkedList with values, which will help you a lot while writing unit tests and prototypes. Initializing a list while declaring is very convenient for quick use, but unfortunately, Java doesn't provide any programming constructs like collection literals of Scala, but there is a trick which you can use to declare and initialize a List at the same time. This trick is also known as initializing List with values. I have used this trick a lot while declaring list for unit testing and writing demo programs to understand an API etc and today I'll you'll also learn that.

Sunday, May 5, 2019

3 Best Spring Security Online Training Courses for Java Developers

The Spring Security is one of the leading open source, security framework which allows you to implement security in Java based web applications. It provides several security features e.g. authentication, authorization, remember me out-of-the-box, which means you can directly use them without adding code or changing your class. Yes, Spring Security implements security at application level i.e. you can even secure your non-secure resource without modifying them. It is also the leading framework to secure RESTful Web Services. Because of all these, the demand for Java developers with good knowledge of Spring Security is very high. They are also some of the highly paid Java developers. Many Java and Spring developer, particularly those who are involved in enterprise and Java web development are learning Spring Security.

Tuesday, April 30, 2019

Grokking Algorithms Book Review - Best Data Structure and Algorithm Book for Beginner Programmer and Computer Science Students

Hello guys, I have read many books on data structures and algorithms like Introduction to Algorithms by Thomas H. Corman and Algorithm design manual by Steve S. Skiena, so when I come to know about this book, I thought, just another book on algorithms, but I was wrong. This is not just another book on algorithms but one of the most interesting books you will ever read on Algorithms and Data structure. It doesn't cover all the data structure and algorithms you see in Computer Science but whatever it covers, it does really well and that's what matters most for beginner programmer or Computer Science students.

Monday, April 22, 2019

How to find and kill a Process Listening on a port in Linux? netstat and lsof command examples

In Linux, many times, you want to find out the PID of a process which is listening on a port e.g. if multiple tomcat servers are running on a host and you have to kill that process, but in order to kill that process you need the process id, how do you find the PID of the tomcat listening on port 8080? There are many Linux commands to find the process using a specific port, but I'll share what I use. I always use the netstat command with -p option, which displays process id of the process listening on a port. Btw, netstat is not the only command to find all processes using a particular port, you can also use the lsof command for the same purpose.

Saturday, April 20, 2019

How to share your Programming Articles on Javarevisited for more Exposure

Hello, Friends,
I have been writing Java articles for a long time and one thing I have learned from that experience is that learning makes you a better Programmer and Software developer. It's also one of the important tips I have shared on how to become a better programmer article long back. It seems many people like that and contacted me about that but their main difficulty was that after writing one or two articles they get frustrated because no one was reading it. Well, I can understand but it takes a lot of time and effort to build a following. I am fortunate and really grateful that Java community has given me so much love and that's why I have decided to do my bit to promote and encourage every new Java programmer/writer/blogger to the best I can.

Wednesday, April 17, 2019

How to Find Middle Element of Linked List in Java in Single Pass

ow do you find the middle element of LinkedList in one pass is a programming question often asked Java and non-Java programmers in telephonic Interview. This question is similar to checking palindrome or calculating the factorial, where Interviewer sometimes also ask to write code. In order to answer this question candidate must be familiar with LinkedList data structure i.e. In the case of singly LinkedList, each node of Linked List contains data and pointer, which is the address of next Linked List and the last element of Singly Linked List points towards the null. Since in order to find middle element of Linked List you need to find the length of linked list, which is counting elements till end i.e. until you find the last element of Linked List.

Sunday, April 14, 2019

Spring Boot Error - Error creating a bean with name 'dataSource' defined in class path resource DataSourceAutoConfiguration

Hello guys, If you are using Spring Boot and getting errors like "Cannot determine embedded database driver class for database type NONE" or "Error creating a bean with name 'dataSource' defined in class path resource ataSourceAutoConfiguration" then you have come to the right place. In this article, we'll examine different scenarios on which this Spring Boot error comes and what you can do to solve them. The general reason for this error is Spring Boot's auto-configuration, which is trying to automatically configure a DataSource for you but doesn't have enough information. It is automatically trying to create an instance of DataSourceAutoConfiguration bean and it's failing.

Saturday, April 13, 2019

How to generate an Array of Prime numbers in Java - Sieve of Eratosthenes Algorithm Example

Hello guys, I have said many times that a good knowledge of Data Structure and Algorithms is the first step towards becoming a better programmer and that's why I share a lot of Data structure and Algorithm stuff in this blog. To continue the tradition, I am going to share an interesting algorithm today, The Sieve of Eratosthenes algorithm, which can be used to generate prime number up to a given number. There are many occasions when you need to generate all prime numbers up to a specified integer and one algorithm which is most often used to generate prime numbers is the Sieve of Eratosthenes Algorithm. Surprisingly, not many developers know about this algorithm, particularly Java programmers, which is mainly because not doing enough competitive programming.

Thursday, April 11, 2019

Top 8 Python Libraries for Data Science, Machine Learning, and Artificial Intelligence

Hello guys, today I am going to talk about something which is not related to Java but a very interesting technology development which is happening around and you simply can't afford to miss out this opportunity. Yes, you guessed it right, I am talking about Machine learning, Artificial Intelligence, and deep learning. There is a good chance that you might have already heard about them and even started learning them. You may be either form Python camp or learning R programming for the sake of machine learning. When I started my journey of Machine learning and Data Science, I had to first make a choice about choosing the right programming language as both R and Python were doing great.

Tuesday, April 9, 2019

How to find the largest and smallest number in given Array in Java

Hello guys, today I am going to discuss one of the frequently asked programming interview questions to find the largest and smallest number from an integer array. This question is commonly asked on telephonic interviews and the first round for screening candidates. This coding problem is in the same league of other frequently asked algorithmic question like Fibonacci, Palindrome, Prime, and Power of two checks. They are easy but you will find them difficult during the interview because of the pressure, particularly if you have not solved them before. Sometimes even if you have solved the problem one time, you tend to do mistakes because you haven't understood them properly. So, always take your time to understand the question.

Saturday, April 6, 2019

Does Spring Certification helps in Job and Career? 5 Reasons to Become a Certified Spring Developer

One of the frequently asked questions among Java and Spring developer is whether Spring certification is valuable? Or does Spring Certification help you in Job and Career? These questions are not very different from what Java developer asks about Oracle's Java certification (see here). The short answer to these question is Yes, Spring Certifications are very valuable, and it not only provides Industry recognition for your knowledge, experience, and skill but also set you apart from the millions of Java and Spring developer who are not certified. Of course, as with any certification, the most valuable part apart from recognition is the learning process, and this is true for Spring certifications as well.

Saturday, March 23, 2019

Difference between Stable and Unstable Sorting Algorithm - MergeSort vs QuickSort

Recently in one on the interview, after some initial questions about sorting algorithms e.g. how do you write QuickSort or difference between QuickSort and MergeSort, the interviewer asked about do you understand the difference between stable and unstable sorting algorithm? This question was new to my reader, so he says, Sorry, never heard about that. The story ended there, and Interviewer moved on to next question but like many of us, my reader went on to find more about unanswered questions and ultimately he asks me what is the meaning of a stable and unstable sorting algorithm? Some of you might be heard about it and many of you might not know about this distinction, I'll try to answer this question in this article.