Monday, December 13, 2021

What is Log4j 2 RCE issue CVE-2021-44228? How to solve Log injection? [Tactical and Permanent Fix]

Hello guys, since the last couple of days, there is a lot of chaos going into the Java world due to the Log4j2 issue which allows Remote code execution (RCE), the CVE-2021-44228, which is designated a zero-day vulnerability. Everyone is busy whether their Java application is impacted and given the popularity of Log4j it's a good chance that your application will be impacted.  Even if you are not using Log4j2 directly, they might be used by the framework or library you use like Spring Boot, Hadoop, Elastic Serach, or Struts. This is kind of a serious issue becuase RCE Vulnarabilyt means it allows hackers to execute code in your servers, and this has been used in past on many breaches like the 2017 Equifax data breach but its not time to lose calm and understand the impact and whether your app is affected or not and what you can do in short term to prevent it. 

Tuesday, December 7, 2021

Top 5 Courses to learn Software Development SDLC Process in 2024 - Best of Lot

Hello folks, the Software development lifecycle is an essential skill for any programmer, developer, project manager, tech lead, team lead, or scrum master. If you want to learn SDLC and look for the best online courses, you have come to the right place. In the past, I have shared the best courses to learn OOP design and Software architecture, and in this article, I will share the best online training courses to learn Software Development processes. Any development team needs to follow some pre-defined roles called the software development life cycle to create any product ranging from website software or a web application. The requirement was set by the customer and needed to be followed by the development team.

Monday, December 6, 2021

Top 5 Courses to learn Bootstrap CSS Framework for Beginners in 2024 - Best of Lot

Hello guys, If you are doing web design and want to learn Bootstrap to become a better web designer, you have come to the right place. In the past, I have shared the best courses to learn HTML, CSS, JavaScript, and Web Development, and today, I'll share the best online courses to learn Bootstrap in 2024. Bootstrap is one of the most popular CSS Frameworks in the world. Is it meant for developing responsive and mobile-first websites? This is the reason why in the last couple of years, it has grown a lot in popularity, and it’s one of the essential tools for both web designers and front-end developers. In fact, full-stack Developers can also learn Bootstrap to get a feeling for design and become truly full-stack developers.

Sunday, December 5, 2021

Top 10 Free Educative.io Courses to Learn Java, Python, and JavaScript in 2024 [Text Based] [UPDATED]

Hello guys, if you are looking for text-based, interactive free courses to learn in-demand skills like Python, Java, C++, and JavaScript, then you have come to the right place. Earlier, I have shared the best courses to learn Python, Java, C++, and JavaScript, and today, I am going to share some great, free, online text-based interactive courses to learn Java, Python, C, C++, JavaScript, R, Scala, and Web Development from Educative. If you don't know, Educative is a new platform for learning online. Unlike traditional video course platforms like Udemy or Pluralsight, they provide Interactive Courses for Software Developers.

Saturday, December 4, 2021

Top 5 Free Courses to learn Oracle Database and SQL Online in 2024 - Best of Lot

Hello guys, if you want to learn Oracle SQL and look for free online courses, you have come to the right place. Earlier, I shared the best SQL and Database courses and books, and today, I will share free Oracle SQL courses for beginners. These are free courses from Udemy, Pluralsight, Coursera, and other reputed online learning websites. They are made accessible for education and learning purposes.  Thousands of people have already joined this course, and you can also do the same and learn Oracle SQL from the comfort of your home or office. 

Top 5 CompTIA IT Fundamentals (ITF+) Certification Courses and Practice Tests in 2024 - Best of Lot

Hello guys, if you are preparing for the CompTIA I.T. Fundamentals certification exam and looking for the best online courses, then you have come to the right place. N the past, I have shared the best online practices to pass CompTIA certifications like CompTIA A+, Cloud+, Linux+, and Security+  exams. In this article, I will share the best courses practices tests to pass the CompTIA I.T. Fundamentals certification. This is one of the best certifications for people who want to start their careers. You will learn essential I.T. skills and computer science concepts and gain certification to showcase your skills. 

Friday, December 3, 2021

Top 5 Kubernetes Courses to Crack Certified Kubernetes Administrator Exam (CKA) in 2024 - Best of Lot

Hello guys, if you are preparing for Kubernetes Administrator certification and looking for the best online courses to start with, then you have come to the right place. In the past, I have shared the best courses to learn Kubernetes and Docker. In this article, I will share the best online courses to prepare for the prestigious Certified Kubernetes Administrator (CKA) exam. There is a lot of demand for skilled Kubernetes administrators to manage cloud environments and Kubernetes clusters, and this exam aims to produce experienced Kubernetes developers and administrators.

Top 5 Courses to learn Oracle Database and PL/SQL in 2024 - Best of Lot

Hello folks, f you have been thinking of learning Oracle and PL/SQL in 2024 and looking for the best online resources like books, courses, and tutorials, then you have come to the right place. Earlier, I shared the best Oracle books and free courses to learn Oracle Database, and in this article, I will share the 5 best online training courses to learn Oracle database and PL/SQL. These are the courses from sites like Udemy and Pluralsight and created by expert trainers and DBAs who have in-depth knowledge of Oracle and PL/SQL, and you can use them to learn Oracle from scratch or level up your Oracle and PL/SQL Skills. 

Thursday, December 2, 2021

Top 5 Online Courses to Learn Hadoop and Big Data in 2024 - Best of Lot

If you are learning Big Data and want to explore the Hadoop framework and looking for some excellent courses, then you have come to the right place. In this article, I am going to share some of the best Hadoop courses to learn Hadoop in depth. In the last couple of articles, I have shared some Big Data and Apache Spark resources, which are well received by my readers. After that, a couple of my readers emailed me and asked about some Hadoop resources, like books, tutorials, and courses, which they can use to learn Hadoop better. This is the first article in the series on Hadoop; I am going to share a lot more about Hadoop and some excellent resources in the coming month, like books and tutorials.

Top 5 Online Courses to Learn React Native for Beginners in 2024 - Best of Lot

If you are a web developer who wants to go into the massive world of mobile app development but don't want to spend time learning Java or Kotlin for Android development or Objective C or Swift for iOS development, React Native could be an excellent tool for you. React Native is an extension of React, a popular JavaScript framework to develop web applications, which allows you to build native Android and iOS applications in JavaScript. Unlike Ionic and Cordova, which promotes write once run everywhere but doesn't offer you to create a native app, React Native does convert your code into native code, especially for GUI.

Wednesday, December 1, 2021

Top 5 Courses to Crack Certified Kubernetes Application Developer (CKAD) Exam in 2024 - Best of Lot

Hello guys, if you are preparing for Kubernetes Application developer certification or want to become a Certified Kubernetes Application developer (CKAD) and looking for the best online courses to prepare for this certification, then you have come to the right place. Earlier, I have shared the best courses to learn KubernetesDocker, and CKA courses. Today, I will share the best online courses to crack the Kubernetes Developer certification, also known as the CKAD. These are the best and most affordable online courses from Udemy, Pluralsight, and Whizlabs and help you prepare for crucial exam topics tested during the certification exam. Remember this is a hands-on exam, and you need solid experience and knowledge to pass this Kubernetes Developer certification.

Top 5 Online Courses to become a Salesforce Developer in 2024 - Best of Lot

Hello folks, if you want to become a Salesforce developer and look for the best online training courses, you have come to the right place. Salesforce is customer relationship management used by companies to organize their works and keep the workflow up. Still, it is also a vast platform developer can use to create apps, develop them, customize them, and deploy them on a server. Salesforce has launched many certification programs for these purposes that allow you to learn how this platform works and how to use it, such as the Salesforce Platform App Builder and the Salesforce Administrator, and the Salesforce Development Training, which is required to become a Salesforce developer.

Top 5 Online Training Courses to Learn Puppet in 2024 - Best of Lot

Hello guys, If you are interested in DevOps, you might have heard about Puppet, one of the most popular infrastructure automation tools. If you want to learn Puppet and looking for the best Puppet courses, then you have come to both the right places. Earlier, I have shared the best DevOps courses, and today, I am going to share the 5 best Puppet courses you can join to learn this useful DevOps tool. It is no surprise that automation and orchestration make life very easy, be it a small organization or a large-scale industry that houses hundreds of servers. Puppet plays an important role in infrastructure automation, such as creating and configuring application servers.

Top 10 Pluralsight Courses for React Developers in 2024 - Best of Lot

Hello guys, if you are looking for the best React courses on Pluralsight, then you have come to the right place. Earlier, I have shared the best Pluralsight methods for Java developers, and today, I will share the best courses to learn React.js, one of the most in-demand skills for both Java and Fullstack developers. Pluralsight is one of my favorite learning websites because you can learn from subject matter experts and their courses are also well designed. They don't have giant classes of 50 hours, plus they have multiple courses where you can learn valuable skills in a couple of hours. That's what I like most because I never have that much time. 

Top 6 Courses to learn GitLab CI/CD for Beginners in 2024 - Best of Lot

There are tons of tools in the DevOps world that address different phases of DevOps like create, package, deploy, secure, monitor, etc., but Gitlab does all of them, which is why GitLab is gaining a lot of Traction. Companies like Goldman Sachs, NVIDIA, SIEMENS are using GitLab to create an end-to-end DevOps platform. You can do source code management like Github, CI/CD like Jenkins and TeamCity, Configure infrastructure like Ansible and Puppet, and much more. If you are aiming to become a DevOps Engineer in 2024, then learning GitLab could be a game-changer as there are not many people with GitLab experience, and there is a great demand for IT professionals with GitLab skills. 

Tuesday, November 30, 2021

Top 10 Free Courses to Learn Angular and React.js in 2024 - Best of Lot

There is no doubt that both Angular and React (also known as Angular JS and React JS) are two of the most popular frameworks for modern web development, particularly front-end development. It was Angular who started the new way to develop a web application using JavaScript, but now React, and Vue.js are taking that to another level. I have seen more and more people are learning React in recent times. Btw, today's world is all about full-stack developers like you should know how to develop a web application end-to-end, starting from front-end to back-end, and that's why as a full-stack Java developer, you should React or Angular Framework.

Top 5 Courses to learn Unreal Engine in 2024 - Best of Lot

Hello guys, if you are interested in game development then you may have heard about the Unreal engine, a popular engine to create games in C++. The Unreal Engine is open-source software that allows developers to make video games without even the need to be good at programming or even a programmer with some pre-made games such as a first-person shooter where you can edit it and not start from scratch. If you want to learn Unreal Engine and looking for the best online courses and tutorials then you have come to the right place.

Sunday, November 28, 2021

Top 3 Online Courses to Learn Svelte.js in 2024 - Best of Lot

Hello guys, you might have heard about Svelte.js or svelte, another JavaScript framework for building component-based UI. What? A new JavaScript framework? come on give me a break. Well, It's a little bit different with established JavaScript frontend frameworks like React, Vue.js, and Angular in the sense that it's more like a compiler than a framework or library. In a framework-based application, you ship your code and framework code to the client and they work together in runtime to create magic. While in the case of Svelte.js you don't ship framework code to your client, instead you ship a code generated by the Svelte compiler based upon the instruction you wrote.

Saturday, November 27, 2021

Top 5 Online Courses to Crack CompTIA Linux+ certification in 2024 - Best of Lot

Hello guys, if you are preparing for CompTIA Linux+ certification and looking for the best online courses and practice tests to pass this certification exam on the very first attempt, then you have come to the right place. In the past, I have shared the best courses to learn Linux and pass certification like CompTIA A+, Cloud+, and Security+, and today, I will share the best CompTIA Linux+ course and practice test. These are created by experts and trusted by thousands of developers, and they are chosen from websites like Udemy, Whizlabs, and other reputed online portals. You can use them to prepare better for this certification and crack in the first attempt.

Top 5 Computer Vision Courses, Projects, and Certifications for Beginners in 2024 - Best of Lot

Hello guys, if you are learning Computer Vision and Open CV library in Python and looking for the best online courses, certifications, tutorials, and projects, you have come to the right place. Earlier, I have shared the best python 3 courses, best data science courses, and best tableau courses. Today, I will share the best Computer vision courses for beginners and experienced developers. These online training courses, certifications, and projects have been created by experts and trusted by thousands of developers around the world; you can also join these courses to learn Open CV and Computer Vision in 2024 and add an in-demand and highly valuable skill to your Resume to give your career a boost.

Top 5 Postman Courses for Java Web Developers and API Testers in 2024 - Best of Lot

There is no doubt that Postman is one of the most popular and essential tools for API development and testing, particularly for front-end web developers. It is used by over 3 million developers across the world, which is a good indication of the fact that Postman is an essential tool for REST API development and API Testing. It is also one of the vital tools for Web Developers, and I have already included Postman in my list of 10 Things Every Web Developer should learn in 2024. If you agree with me that Postman is definitely worth learning for frontend and backend developers and looking for some excellent resources to master this awesome tool, then you have come to the right place. In this article, I am going to share some of the best online courses and tutorials to learn Postman for API testing and development.

Top 5 Courses to learn Scala Programming Online in 2024 - Best of Lot

Hello guys, if you want to learn Scala Programming language and looking for the best online courses to start your journey, then you have come to the right place. In the past, I have shared the best Scala books and free Scala courses for Java developers, and today, I am going to share the best Scala courses for Programmers and Java developers. These are the truly best Scala courses and created by experts like Martin Oderskey, the creator of Scala himself; you will get a chance to learn Scala from the creator himself. They are also very affordable as Coursera courses are free for learning, and Udemy courses can be bought for just $10 on Udemy sales.

Friday, November 26, 2021

Top 5 Courses to Learn Groovy and Grails Online in 2024 - Best of Lot

Hello guys, If you want to learn Groovy or Grails in 2024 and looking for some awesome resources like books, courses, and tutorials, then you have come to the right place. In the past, I have shared the best Groovy books and best Gradle courses. Today, I will share some of the best online courses to learn both the Groovy programming language and Grails framework .you might have heard about Groovy, if not maybe heard about Grails, Akka, Play, and Gradle, the top 5 Groovy frameworks for Java developers. Instead of competing with Java, Groovy focuses on co-existing with Java and enhancing Java developers' capability on Java's traditional weak areas like scripting.

Top 5 Courses to Learn Servlet and JSP for Java Web Developers in 2024 - Best of Lot

Hello guys, if you want to learn Servlet and JSP and look for the best Servlet courses, you have come to the right place. In the past, I have shared the best Servlet and JSP books and free Servlet and JSP courses and today, I will share the best Sevelt and JSP online courses from websites like Udemy Coursera and Pluralsight. These courses have been created by experts and trusted by thousands of developers to learn Servlet and JSP. You can also join them to learn these key technologies online from your home or office. Servlet and JSP are two of the most important web technologies for Java developers. In the framework age, you may not directly work with Servlet and JSP but knowing fundamentals like this always helps. 

Top 5 Course to Crack Google Cloud Professional Data Engineer Certification in 2024 - Best of Lot

Hello guys, If you are looking for a Cloud certification, then let me tell you that the Google Cloud Professional Data Engineers are currently in demand for their ability to maintain the process of accumulating, converting, and publishing data with a certain level of expertise on Google Cloud Platform. When I published my list of 10 Cloud Certifications for 2024, I have included a couple of Google Cloud certifications because there are not many Google Cloud certified compared to certified AWS and Azure Professionals. They are mostly known for putting machine learning models into operation, creating and structuring data processing systems to work accurately, and ensuring that the data is secure and scalable.

Thursday, November 25, 2021

Top 5 Courses to Crack Docker Certified Associate Certification Exam in 2024 - Best of Lot

Hello guys, if you are thinking about the Docker Associate exam or want to become a Certified Docker associate and looking for the best online courses to start your preparation then you have come to the right place. In the past, I have shared the best courses to learn Docker and Kubernetes and today, I am going to share the best online courses to crack the Docker Certified Associate Exam in 2024. These are the best Docker courses from Udemy, Coursera, Pluralsight, and Whizlabs and are very useful for this Docker certification. They are created by experts like Nigel Poulton who is Docker Captain himself and they have also trusted ty thousands of Docker developers around the world.

Top 5 Courses to learn VI Editor or Vim in Linux in 2024 - Best of Lot

Hello guys, if you want to master the  VI editor or Vim and looking for the best online courses then you have come to the right place. Earlier, I have shared the best Linux courses and best shell scripting courses and today, I am going to share the best courses to learn VI editor. If you have worked in Linux, then you may know that VIM is one of the most useful and powerful text editors and every people working in a Linux environment should know about VIM. Also known as VI Editor, it is often touted as the go-to-editor for genius developers who make full use of Vim's capability for code navigation and do fancy things.

Wednesday, November 24, 2021

Top 5 Courses to Learn Microsoft SQL Server Database and Transact-SQL in 2024 - Best of Lot

Hello guys, you might know that along with Oracle and MySQL, Microsoft SQL Server is one of the most popular relational databases in the tech world. It's used in many big organizations like Investment Banks, Insurance companies, and particularly at firms that use Microsoft technologies like Windows Server. With the growing popularity and market share of Microsoft Azure, there is a good chance that the demand for Microsoft SQL Server will also increase, particularly in the cloud. There is already a high demand for both Microsoft SQL Server DBA and Programmers who have SQL Server experience, and that's why it's an excellent decision to learn MSSQL in 20243.

Tuesday, November 23, 2021

Top 5 Courses and Books to learn Rust Programming language in 2024 - Best of Lot

Hello guys, if you are looking to learn a new Programming language that will improve your overall programming skills and practices in 2024, then the Rust programming language can be the right choice. Rust is one of the relatively new (born in 2015) and powerful programming languages which combines the power of C++ with the safety of Java and other interpreted languages. When a Programming language is designed, it was either designed for power like C/C++ or for safety like Java, Python, etc. but we didn't have the best of both. There were many attempts to combine the power of C/C++ and safety offered by Java, and it looks like Rust has got that right. Since it was debut in 2015, Rust has gained the attention of the world and the developer community.

Top 10 Best Java 8 Tutorials, Courses, and Books for Beginners

It's been quite some time since Java 8 was released but the Java community is still buzzing with functional programming and lambda expression. Many developers, programmers, and bloggers have already shared lots of really good tutorials to learn lambda expressions, probably the biggest thing in Java world after Generic was introduced in Java 5. While the term "lambda expression" may sound abstract and academic, Java 8 Lambdas can have a big impact on how you program every day. Java 8 has not only introduced Lambda expressions but also Stream API, Functional interfaces, new Date and Time API, and default methods, which has completely changed the way you write your Java code. As a professional Java developer, you will have to learn Java 8 one day, and it's better to do it sooner than later.

Monday, November 22, 2021

Top 5 Courses to Learn RedHat OpenShift in 2024 - Best of Lot

Hello guys, if you want to learn the Red Hat Openshift platform and looking for the best Openshift courses then you have come to the right place. In the past, I have shared the best Docker and Kubernetes courses and in this article, I am going to share the best Openshift courses to join in 2024. if you are in the DevOps space, then you might have heard about Openshift. I didn't know about Openshift but have to learn when I had to work on a Spring boot project, which is deployed on the OpenShift Platform. Don't worry, it's not a very complicated thing to learn, and if you have used Docker and Kubernetes in past then you will appreciate what Openshift brings to the table.

Top 5 Online Courses to Learn Vue.js in 2024 - Best of Lot

Hello frontend and full-stack developers, if you want to use Vue.js for your next project and looking to learn Vue.js online and looking for the best Vue.js resources then you have come to the right website. In the past, I have shared the best React courses and best Angular courses and today, I am going to share the best Vue.js courses, both free and paid for beginners and intermediate developers. These are the best Vue courses from sites like Udemy, Pluralsight, and Educative and created by experts, and thousands of frontend developers have already enrolled to learn Vue.js online. They are also very affordable and you can buy most of them for under $15. But, before looking into these awesome Vue.js courses, let's learn a bit more about Vue.js and why you should learn Vue.js in 2024. 

Top 5 Course to Crack Google's Associate Cloud Engineer Certification Exam in 2024 - Best of Lot

Hello guys, If you are looking to pursue a career as a Google Cloud Engineer or merely just want to acquire a cloud certificate to add to your colorful resume, then taking the Google Cloud Engineer exam might be just the right thing for you. Google Cloud Platform or GCP is one of the top 3 public cloud providers along with AWS and Microsoft Azure and the demand for certified Google cloud professionals is growing exponentaitonal because of increased adoption of the Google Cloud Platform. If you already have a fair amount of experience, then you may want to go for the Professional Cloud exam. But if you are a newbie, or looking to add more certifications to add your CV then the Associate Cloud Engineer exam is the way to go.

Top 5 Online Courses to Learn Modules and Java 9 Features in 2024 - Best of Lot

The last couple of years was the year of releases for Java developers. With versions of JDK 9 to JDK 15, Spring 5, Spring Boot 2.0, and Spring Security 5.0, there was so much to learn for Java developers and all at once, but like many others, I didn't make a good process, and I am looking to turn it around this year. One of my top priority goals for this year is to learn new Java features as quickly as possible to write more about them. It's also essential for you to learn modern Java features to write better code and improve your day-to-day productivity with Java. The Java 9 release intends to change the way Java developers used to write code. It introduces a modular JDK so that developers can only include the modules that they need.

Top 5 Courses and Books to Learn Gradle for Beginners in 2024 - Best of Lot

Gradle is one of the latest tools for Java developers to create build scripts and manage dependencies. It's a good alternative to Maven and the best thing about Gradle is that finally, you have a much more readable, and concise build scripts. With Maven, build scripts are written using XML in pom.xml file which is very verbose, but with Gradle, build scripts are written using Groovy which is very concise by design. This means the same 100 line Maven build script can be replaced by 10 to 20 lines of Gradle script. To give you an exam, here is a diagram that compares a Gradle script to a Maven pom.xml file.

Sunday, November 21, 2021

Top 5 DialogFlow Online Courses to build Chatbots using Python in 2024 - Best of Lot

Do you want to learn how to build chatbots? the darling child of Artificial Intelligence? If yes, then you have come to the right place. Earlier, I have shared the best Data Science and Machine Learning Courses and in this article, I am going to share the best Chatbot courses for beginners. I have helped many of my readers who wanted to build chatbots but didn't know where to start? I think joining an online course is a good idea, and if you are looking for some online courses, then you will find some good ones here, but before that, let's talk about chatbots. If you are not living under the rocks, you might have seen several applications of chatbots like in your online banking portal or any other website.

Top 5 Online Courses to Learn GraphQL for Beginners in 2024 - Best of Lot

If you are a full-stack web developer then you might have heard about GraphQL, another exciting technology. GraphQL is gaining a lot of popularity because of its superiority over traditional REST APIs. Many big companies like Facebook, Coursera, Github, and Yelp have already started using it, which has also helped a lot in terms of gaining popularity. There is a good chance that you might have already have heard about GraphQL in blogs pots, on Medium, or, in general, Web, but like many others, not sure whether it's worth learning or not, and if yes, from where to start. Well, I have been learning GraphQL since last week, and I would like to share some of the resources I have been using for my learning.

Top 5 Online Courses to Learn Flask for Web Development in Python in 2024 - Best of Lot

If one of your resolution this year is to learn web development with Python, then I must congratulate you on making the right choice. Python is the king of a programming language at the moment, and it has many frameworks and libraries to create a robust and scalable web application. One of the most notable of them is Flask, which is known for its simplicity and ease of learning. It allows you to create a web application with a tiny amount of code and work, because of that it's one of the most popular web application frameworks in the Python community and an ideal framework to learn for web development whether you are a beginner or someone with years of experience.

Top 5 Courses to learn Regular Expression in Java, PHP, and JavaScript in 2024 - Best of Lot

You might know that a Regular expression is a powerful tool for pattern matching and searching text. As a programmer, you often need searches like error messages in log files or particular information. Good knowledge of regex can help you to do your job more efficiently. Almost all programming languages support regular expressions. You will find APIs for creating and applying regex in Java, Python, Perl, JavaScript, C++, and others. Similarly, many tools and commands in Linux like grep, awk, and sed also support regex. This really helps while analyzing data in text files. Knowledge of regular Expression is also often a difference between a beginner and an experienced programmer. It certainly makes you a better programmer by expanding your knowledge and giving you a powerful tool for searching and troubleshooting.

Top 5 Online Courses to learn Firebase for Beginners in 2024 - Best of Lot

Hello guys, if you have tried creating a web application or mobile app, then you know that it's not always simple, especially if you're not a full-stack developer with years of experience. The good news is that if you don't want to invest time in setting up a full-fledged backend, which is often not required for small apps, then Firebase can really help you. If you don't know, Firebase is an online service from Google (also available via Google Cloud), which provides a real-time database, authentication service, and several other standard backend functionalities. This means you don't need to create a backend of your own, and you can leverage Firebase to quickly ship your mobile apps or web applications.

Saturday, November 20, 2021

Pluralsight Free Weekend - 7500+ Pluralsight Courses FREE for 3 Days

Hello folks,  I have exciting news to share with you that Pluralsight is running their Free weekend from 19th to 21st November, which means all of their 7500+ courses are free this weekend. This is an excellent opportunity to try and see the high-quality courses from Pluralsight. If you don't know, Pluralsight is one of the most popular online learning platforms for programmers and developers. Whether you want to learn Java, Python, JavaScript, Web Development, or Data Science, Pluralsight has courses for them. The best thing about Pluralsight is that its creators are reputed and authoritative. For example, there are many Java champions like Richard Warburton and Jose Paumard who have created excellent Java courses. 

Friday, November 12, 2021

10 Tips to create Maintainable Java Applications

Hello all, if you are in software development then you know that creating an application is easy but creating a maintainable application that can pass the test of time in production is rather difficult and that's the main reason experienced Sofware developers are paid higher salaries compared to many other jobs. In this article, I am going to share with you some tips on creating maintainable Java applications which will help you not just in the new year, but also in all the coming years in your software development career.  One aspect of development, which is often overlooked by developers is to create applications that are both easy to maintain and support. Since software spends 90% of its lifetime in maintenance mode, it's very important that your application is easy to configure, support, and maintain. 

Wednesday, November 10, 2021

How to HashMap in Java? Example Tutorial

Hello friends, we are here today again on our journey to Java. I hope everyone is fine and ready to board our train of knowledge. Today we are gonna learn something very interesting and very exciting, yes I am talking about the HashMap class in Java which is the implementation of hash table data structure. In the past, I have shared my thoughts on How HashMap works in Java as well as frequently asked HashMap interview questions but I have never shared an example of how to use HashMap in Java, or when to use HashMap. Today's topic will definitely be very useful in coding and programming. This topic would surely decrease your time complexity if any task very significantly :p 

So what's the wait? Let's start!

Sunday, November 7, 2021

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 pages 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 frameworks. 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.

Difference between Stable and Unstable Sorting Algorithm - MergeSort vs QuickSort

Recently in one interview, after some initial questions about sorting algorithms e.g. how do you write QuickSort or the difference between QuickSort and MergeSort, the interviewer asked about do you understand the difference between stable and unstable sorting algorithms? This question was new to my reader, so he says, Sorry, never heard about that. The story ended there, and Interviewer moved on to the next question but like many of us, my reader went on to find more 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.

Saturday, November 6, 2021

How to solve java.lang.classnotfoundexception sun.jdbc.odbc.jdbcodbcdriver in Java 8

java.lang.classnotfoundexception sun.jdbc.odbc.jdbcodbcdriver exception comes in Java 8 because it has removed the JDBC ODBC bridge driver class "sun.jdbc.odbc.jdbcodbcdriver" from JDK and JRE. This class is required to connect any database using Object database connectivity driver e.g. Microsoft Access, but unfortunately, you cannot use it from JDK 8 onward. In order to solve this error, just use the Jackcess library or a commercial driver like HXTT. Normally, in pre-Java 8 world, java.lang.classnotfoundexception sun.jdbc.odbc.jdbcodbcdriver error comes when you try to connect to the Microsoft Access database from Java using JDBC and JDBC ODBC bridge driver is not available in the classpath.

Does Standard Column Width of 80 On Coding Make Sense in Modern Era of Big Monitors?

One of the oldest coding practices is to keep line width 80, and many of us follow it blindly but have you ever thought about why we have this practice in the first place? I believe it was to make your code more readable in the age of small monitors so that the whole content can fit on the screen, or it might have originated from the age of punch cards, which was used to be 80 columns wide. This sounds reasonable when we think about those old days but do you think this rule makes sense now? We are now living in the age where most of the developers have got large monitors, which can show up to 180 characters, doesn't this is wastage of precious monitor space? It also makes your code unnecessary long, than it actually is.

Friday, October 29, 2021

How to Split String in SQL Server and Sybase? Example Tutorial

Sometimes we need to split a long comma-separated String in a Stored procedure e.g. Sybase or SQL Server stored procedures. It's quite common to pass comma delimited or delimiter separated String as an input parameter to Stored procedure and then later split comma separated String into multiple values inside stored proc. This is not just the case of the input parameter but you can also have a comma-separated string in any table data. Unfortunately, there is no split() function in Sybase or SQL Server 2005 or 2008 which can directly split a string based on delimiter just like in the Java string split method

How to Count Number of Leaf Nodes in a Binary Tree in Java ? [ Iterative and Recursive Solution]

Hello guys, today I am going to talk about an interesting binary tree-based coding problem from Programming Job interviews. If you have attended a couple of technical interviews then there is a good chance that you already have seen this question about counting the number of leaf nodes in a binary tree. If you know how to solve this problem then it's well and good but if you haven't don't worry, you will learn in this article. If you follow this blog then you might know that I have discussed a lot of data structure and algorithms problems here, including array, linked list, hash table, binary tree, and binary search tree. 

Thursday, October 28, 2021

How to Load Resources from Classpath in Java with Example

Classpath in Java is not only used to load .class files, but also can be used to load resources e.g. properties files, images, icons, thumbnails, or any binary content. Java provides API to read these resources as InputStream or URL. Suppose, you have a properties file inside the config folder of your project, and you want to load that properties file, how do you do that? Similarly, you have icons and thumbnails for your web applications on the icons directory of your project, how do you load them? The answer is by using java.lang.Class' getResource() and getResourceAsStream() method. These methods accept the path of resource as String and return URL and InputStream respectively.

Wednesday, October 27, 2021

6 ways to declare and initialize a two-dimensional (2D) String and Integer Array in Java - Example Tutorial

Declaring a two-dimensional array is very interesting in Java as the Java programming language provides many ways to declare a 2D array and each one of them has some special things to learn about. For example, It's possible to create a two-dimensional array in Java without specifying the second dimension, sounds crazy right? but it's possible because a two-dimensional array in Java is nothing but an array of array. You can even create a two-dimensional array where each subarray has a different length or different type, also known as a heterogeneous array in Java. This means it's possible to create a two-dimensional array with variable column length in Java.

Tuesday, October 26, 2021

How to Calculate Difference between two Dates in Java (In Days) - Example Tutorial

If you are not running on Java 8, then there are two ways to calculate the difference between two dates in Java in days, either by using standard JDK classes e.g. java.util.Date and java.util.Calendar or by using the joda-time library. Unfortunately, Java's old Date and Calendar API is buggy and not intuitive, so many of us by default use Joda for all date and time arithmetic. In this example, you will learn how to find the number of days between today and any date entered by a user using Joda, as well as without using any third-party library. When I first time face this problem, I thought what's a big deal about finding the difference between dates? If you can convert Date to milliseconds then finding a number of days, months or years are just a matter of simple arithmetic, but I was WRONG. I was not thinking about the real-world date and time nuisance like leap seconds, leap years, and daylight saving time.

Friday, October 22, 2021

How to implement Bucket Sort in Java? [Solved] - Example Tutorial

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

2 Best Open source Java Libraries to Create PDF documents - iText vs Apache FOP

PDF format is a popular format for sending receipts, email confirmation, and other documentation and we often have a requirement to create PDF documents using Java, mostly in JSP pages. Since most of the official documentation uses PDF format nowadays, it becomes imperative to support PDF files. Recently I received a couple of questions regarding the suggestion of open-source Java PDF libraries, like which is the best open source PDF library in Java or should I use iText or Apache FOP in my Java application for PDF processing. These questions motivates me to write this post. In this article, I will share a couple of Java based open source PDF libraries, both FREE and with some licensing fees, which you can use to generate PDF documents in Java projects.

What is difference between ArrayList and ArrayList<?> in Java?- Raw Type vs Wildcard Example Tutorial

One of my readers asked me about the difference between ArrayList vs ArrayList< in Java?>, which was actually asked to him in a recent Java development interview. The key difference between them is that ArrayList is not using Generics while ArrayList is a generic ArrayList but they look very similar. If a method accepts ArrayList or ArrayList<?> as a parameter then it can accept any type of ArrayList like ArrayList of String, Integer, Date, or Object, but if you look closely you will find that one is raw type while the other is using an unbounded wildcard. What difference that could make? Well, that makes a significant difference because ArrayList with raw type is not type-safe but ArrayList<?> with the unbounded wildcard is type-safe.

Wednesday, October 20, 2021

Difference between Abstraction and Encapsulation in Java? OOP Question Answer

Both Abstraction and Encapsulation are two of the four basic OOP concepts which allow you to model real-world things into objects so that you can implement them in your program and code. Many beginners get confused between Abstraction and Encapsulation because they both look very similar. If you ask someone what is Abstraction, he will tell that it's an OOP concept which focuses on relevant information by hiding unnecessary detail, and when you ask about Encapsulation, many will tell that it's another OOP concept which hides data from the outside world. The definitions are not wrong as both Abstraction and Encapsulation do hide something, but the key difference is on intent.

Recursive Binary Search Algorithm in Java - Example Tutorial

The binary search algorithm is one of the most famous search algorithms in computer science. It allows you to search a value in logarithmic time i.e. O(logN), which makes it ideal to search a number on a huge list. For example, in order to search a number in a list of 1 million numbers will take around 210 comparisons compared to 1 million comparisons required by the linear search algorithm. The only thing is that the list must be sorted before you can use a binary search algorithm and it must support index-based search. That's why binary search is often implemented using an array because doing a binary search with a linked list will not be fast because it doesn't provide index-based access i.e. O(1) access. You have to traverse to that element to read its value in the linked list which is O(n), effectively reducing the performance of binary search to a sequential search algorithm.

Tuesday, October 19, 2021

3 Ways to Prevent Method Overriding in Java - Private, Static and Final Method Example Tutorial

Every Java programmer knows that final modifier can be used to prevent method overriding in Java because there is no way someone can override final methods; but, apart from final modifier, is there any other way to prevent method overriding in Java? This was the exact question, asked to one of my friend in a recent Java interview at one of the leading Investment bank. I guess, he was lucky to get this question because he already knows those tricks and was able to answer it quickly. When he told me about his experience,  I didn't understand why someone ask this question? What is the purpose? What they were trying to find out? I can understand if they have asked what's the best way to prevent method overriding in Java, or what is the risk of overriding? 

Monday, October 18, 2021

Java 8 Date Time - 20 Examples of LocalDate, LocalTime, LocalDateTime

Along with lambda expressions, streams, and several minor goodies, Java 8 has also introduced brand new Date and Time API, and in this tutorial, we will learn how to use Java 8 Date Time API with simple how-to-do task examples. Java's handling of Date, Calendar, and Time is long been criticized by the community, which is not helped by Java's decision of making java.util.Date mutable and SimpleDateFormat not thread-safe. It seems, Java has realized a need for better Date and time support, which is good for a community which already used to of Joda Date and Time API.

Difference between Stack and Queue Data Structure in Java? Example

Stack and Queue are two of the important data structures in the programming world and have a variety of usage. As opposed to the array and linked list, which are considered primary data structures, they are secondary data structures that can build using an array or linked list. You can use Stack to solve recursive problems and Queue can be used for ordered processing. The difference between Stack and Queue Data structure is also one of the common questions not only in Java interviews but also in C, C++, and other programming job interviews.

10 Examples of Converting a List to Map in Java 8

Hello guys, suppose you have a list of objects, List and you want to convert that to a Map, where a key is obtained from the object and value is the object itself, how do you do it by using Java 8 stream and lambda expression? Prior to Java 8, you can do this by iterating through the List and populating the map by keys and values. Since it's an iterative approach and if you are looking for a functional solution then you need to use the stream and lambda expression, along with some utility classes like Collectors, which provides several useful methods to convert Stream to List, Set, or Map.

Tuesday, October 12, 2021

How to Remove all Unused imports in a Java file - Eclipse Shortcut Example

How to remove all unused imports in Eclipse
Eclipse IDE gives a warning "The import XXX is never used" whenever it detects unused import in a Java source file and shows a yellow underline. Though unused import in Java file does not create any harm, it's unnecessary to increase the length and size of Java source file and if you have too many unused imports in your Java source file, those yellow underline and Eclipse warning affect readability and working. In my last post on Eclipse, we have seen some Java debugging tips on Eclipse and in this post, we will see Eclipse shortcut to remove all unused imports in Eclipse. 

Friday, October 8, 2021

How to get just DATE or TIME from GETDATE() in SQL Sever - Example Tutorial

The GETDATE is one of the most popular built-in methods of  Microsoft SQL Server, but unlike its name suggests, it doesn't return just date, instead, it returns date with time information e.g. 2015-07-31 15:42:54.470, quite similar to our own java.util.Date from Java world. If you want just a date like 2015-07-31, or just a time like 15:42:54.470 then you need to either CAST or CONVERT output of GETDATE function into DATE or TIME data type. From SQL Server 2008 onward, apart from DATETIME, which is used to store both date and time, You also have a DATE data type to store data without time e.g. 2015-07-31, and a TIME data type to store time without any date information like 15:42:54.470.

Wednesday, October 6, 2021

5 ways to Convert Java 8 Stream to List - Example, Tutorial

One of the common problems while working with Stream API in Java 8 is how to convert a Stream to List in Java because there is no toList() method present in the Stream class. When you are processing a List using Stream's map and filter method, you ideally want your result in some collection so that you can pass it to other parts of the program. Though java.util.stream.Stream class has toArray() method to convert Stream to Array, but there is no similar method to convert Stream to List or Set. Java has a design philosophy of providing conversion methods between new and old API classes e.g. when they introduced Path class in JDK 7, which is similar to java.io.File, they provided a toPath() method to File class.

How to distinguish logging per Client or Request in Java? Use MDC or Mapped Diagnostic Context in Log4j Example

The MDC or Mapped Diagnostic Context is a concept or feature of the Log4j logging library which can be used to group related log messages together. For example, by using MDC you can stamp a unique identification String like clientId or orderId on each log message, and then by using grep command in Linux, you can extract all log messages for a particular client or order to understand exactly what happened to a particular order. This is especially very useful in multi-threaded, concurrent Java applications where multiple threads are simultaneously processing multiple orders from multiple clients.  In such applications, searching for relevant log messages in a big log file where log messages for multiple orders or clients are overlapping is a big task.

Sunday, October 3, 2021

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 the checkbox and returns only those checkboxes which have this property. For example, the 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.

What is Default, Defender or Extension Method of Java 8 with Example

Java 8 now allows you to add non-abstract method implementations to interfaces by utilizing the default and static keywords. Methods with default keywords are known as default methods or defender methods in Java. Before Java 8, it was virtually impossible to change an interface once published. Any change like the addition of a new method would have broken all clients. That's why when Java 8 decided to switch to internal iterator implementation using the forEach() method, they face the daunting challenge of breaking all implementation of the Iterable interface. Since backward compatibility is a top priority for Java engineers, and it wasn't practical to break all clients, they came up with the idea of the default method.

Friday, October 1, 2021

How to convert float to long or int data type in Java? Example

Yesterday one of the new joiner Java Trainee Engineers from our team came to me and asked about how do you convert a float variable into a long or int data type? He was storing some values coming from another system in the database and only wanted to store values before the decimal point e.g. he was getting "3.144" and he wants to convert it to "3" to store into the database. The good thing was that API was returning a float primitive value and you don't need to convert a String to float etc. I asked him whether he needs routing or not, which he wasn't sure but it turns out that he didn't need that. I explained to him how to do that and that's what you will find in this article as well. In short, there are 3 ways to convert a float value into long or int in Java, but we will only focus on the long data type part.

Monday, September 27, 2021

How to Clone a Collection in Java? Deep copy of ArrayList and HashSet Example

Programmers often mistook copy constructors provided by various collection classes, as a means to clone Collection like List, Set, ArrayList, HashSet, or any other implementation. What is worth remembering is that the copy constructor of Collection in Java only provides a shallow copy and not a deep copy, which means objects stored in both original Lists and cloned List will be the same and point to the same memory location in the Java heap. One thing, which adds to this misconception is a shallow copy of Collections with Immutable Objects. Since Immutable objects can't be changed, It's Ok even if two collections are pointing to the same object. This is exactly the case of String contained in the pool, update on one will not affect the other.

How to use Stream with List and Collection in Java 8? filter + map Example Tutorial

Finally, Java 8 is here, after more than 2 years of JDK 7, we have a much expected Java 8 with lots of interesting features. Though Lambda expression is the most talked-about item of the coming Java 8 release, it wouldn't have been this much popular, if Collections were not improved and Stream API was not introduced. Java 8 is bringing on new Streams API java.util.stream package, which allows you to process elements of Java Collections in parallel. Java is inheritably sequential and there are no direct means to introduce parallel processing at the library level, stream API is going to fill that gap. By using Stream API in Java, you can filter elements of collection on a given criterion. For example,  if you have a list of orders, you can filter buy orders with sell orders, filter orders based upon their quantity and price, and so on.

How to fix java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver [Solution]

This error comes when you try to connect to the Microsoft SQL Server database from the Java program but the required JDBC driver is not available in Classpath or driver is available in CLASSPATH but the class loader is not able to find it due to classpath intricacies. Depending upon your situation, a solution could be as simple as downloading any of sqljdbc.jar, sqljdbc4.jar, or sqljdbc41.jar, based upon the Java version you are using and adding them into CLASSPATH as set CLASSPATH = %CLASSPATH%; (path to Microsoft JDBC driver) in Windows. BTW, in most of the cases "java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver" comes because of classpath intricacies.

Saturday, September 25, 2021

How to Convert an Array to Comma Separated String in Java - Example Tutorial

The simplest way to convert an array to comma separated String is to create a StringBuilder, iterate through the array, and add each element of the array into StringBuilder after appending the comma. You just need Java 1.5 for that, even if you are not running on Java 5, you can use StringBuffer in place of StringBuilder. The joining of String has got even easier in JDK 8, where you have got the join() method right in the String class itself. The join() method takes a delimiter and a source, which can be an array or collection, and returns a String where each element is joined by a delimiter.

Thursday, September 23, 2021

Overriding equals() and hashCode() method in Java and Hibernate

Override equals and hashCode in Java
Equals and hashCode in Java are two fundamental methods that are declared in Object class and part of the core Java library. equals() method is used to compare Objects for equality while hashCode is used to generate an integer code corresponding to that object. equals and hashCode have been used extensively in Java core library like they are used while inserting and retrieving Object in HashMap, see how to get method of HashMap works in Java for the full story, equals method is also used to avoid duplicates on HashSet and other Set implementation and every other place where you need to compare Objects.

Wednesday, September 22, 2021

Difference between map() and flatMap() in Java 8 Stream - Example

The map() and flatmap() are two important operations in the new functional Java 8. Both represent functional operation and they are also methods in java.util.stream.Stream class but the map is used for transformation and flatmap is used for both transformation and flattening, that's why it's called the flatmap. The key difference between map() and flatmap() function is that when you use a map(), it applies a function on each element of the stream and stores the value returned by the function into a new Stream. This way one stream is transformed into another like a Stream of String is transformed into a Stream of Integer where each element is the length of the corresponding Stream.

Tuesday, September 21, 2021

10 Example of Lambda Expressions and Streams in Java 8

Java 8 release is just a couple of weeks away, scheduled on 18th March 2014, and there is a lot of buzz and excitement about this path-breaking release in the Java community. One feature, which is synonymous with this release is lambda expressions, which will provide the ability to pass behaviors to methods. Prior to Java 8, if you want to pass behavior to a method, then your only option was the Anonymous class, which will take 6 lines of code, and the most important line, which defines the behavior is lost in between. Lambda expression replaces anonymous classes and removes all boilerplate, enabling you to write code in a functional style, which is sometimes more readable and expression.

Monday, September 20, 2021

5 Difference between Constructor and Static Factory method Pattern in Java

The common way to create objects in Java is by using public constructors. A class provides a public constructor like java.lang.String so anyone can create an instance of String class to use in their application, but, there is another technique that can be used to create objects in Java and every experienced Java programmer should know about it. A class can provide a public static factory method that can return an instance of the class e.g. HashMap.newInstance(). The factory method is a smart way to create objects in Java and provides several advantages over the traditional approach of creating objects using constructors in Java. It can also improve the quality of code by making the code more readable, less coupled, and improves performance by caching.

How to set Java Path and Classpath in Windows 7, 8 and Windows 10 - Tutorial

So, you just bought a new PC or Laptop with Windows 8 operating system, and wondering how to set PATH and Classpath on Windows 8; Or, you might have just upgraded your Windows 7 laptop to the professional edition of Windows 8 and looking to set JDK Path to compile Java programs. Not to worry, this is the second step for anyone who wants to learn Java programming. Of course, the first step is to install JDK.  In this Java tutorial, we will see step by step guide to set Java PATH and CLASSPATH in the Windows 8 operating system. By the way, if you are learning Java in Windows 10 operating system, You should still be able to set the Java path and classpath in Windows 10 by following the steps given here, because navigation steps for modifying environment variables on Windows 10 and Windows 8 are almost same.

Difference between @WebMvcTest and @DataJpaTest in Spring Boot? Example

Hello guys, testing the Spring Boot application is very important but not many developers pay attention to that. If you are learning how to test the Spring Boot application and wondering what is @WebMvcTest and @DataJpaTest and how to use them then you have come to the right place. Earlier, I have shared 20+ Spring Boot Testing interview questions and in this article, I will teach you how to use @DataJpaTest and @WebMvcTest annotation with real-world examples.  Spring Boot is an evolution of the Spring framework which helps to create both stand-alone and spring-based applications with minimal cost. 

Sunday, September 19, 2021

How to remove all special characters from String in Java? Example Tutorial

You can use a regular expression and replaceAll() method of java.lang.String class to remove all special characters from String. A special character is nothing but characters like - ! #, %, etc. Precisely, you need to define what is a special character for you. Once you define that you can use a regular expression to replace those characters with empty String, which is equivalent to removing all special characters from String. For example, suppose, your String contains some special characters e.g. "Awesome!!!" and you want to remove those !!! to reduce some excitement, you can use replaceAll("!", "") to get rid of all exclamation marks from String.

Difference between Comparison (QuickSort) and Non-Comparison (Counting Sort) based Sorting Algorithms? Example

For many of you, this might be a surprise that how you can sort or arrange items without comparing them with each other, but it's possible. There are some sorting algorithms that perform sorting without comparing the elements rather than making certain assumptions about the data they are going to sort. The process is known as non-comparison sorting and algorithms are known as the non-comparison-based sorting algorithms. Non-comparison sorting algorithms include Counting sort which sorts using key-value, Radix sort, which examines individual bits of keys, and Bucket Sort which examines bits of keys. These are also known as Liner sorting algorithms because they sort in O(n) time. They make certain assumptions about data hence they don't need to go through a comparison decision tree.

Why Static Code Analysis is Important? Pros and Cons

In the last few years, Software code quality and security have gone from being a “nice to have” to a necessity, and many organizations, including investment banks, are making it mandatory to pass static code analysis tests, penetration testing, and security testing before you deploy your code in production. Static analysis tools like findbugs and fortify are getting popular every passing day and more and more companies are making fortify scan mandatory for all new development.  For those unaware of what static code analysis is, static code analysis is about analyzing your source code without executing them to find potential vulnerabilities, bugs, and security threats.

Saturday, September 18, 2021

How to Read/Write from RandomAccessFile in Java - Example Tutorial

Random access file is a special kind of file in Java that allows non-sequential or random access to any location in the file. This means you don't need to start from 1st line if you want to read line number 10, you can directly go to line 10 and read. It's similar to the array data structure, Just like you can access any element in the array by index you can read any content from the file by using a file pointer. A random-access file actually behaves like a large array of bytes stored in the file system and that's why it's very useful for low latency applications which need some kind of persistence e.g. in front office trading application and FIX Engine, you can use random access file to store FIX sequence numbers or all open orders.

Friday, September 17, 2021

Difference between JAX-RS, Restlet, Jersey, RESTEasy, and Apache CXF Frameworks

The JAX-RS is a Java specification request (JSR 311 & JSR 339) that standardizes the development and deployment of RESTful web services using Java and JEE technologies. It provides API in Java Programming language to create web services according to the REST (Representational State Transfer) architectural pattern. Both Restlet and Jersey are two of the most popular implementation of JAX-RS used for developing RESTful web services in Java ecosystem but there is a couple of other implementation also exist like Apache Wink, Apache CXF, and JBoss RESTEasy, along with omnipresent and the most popular option of creating REST web services with Spring Framework, Spring Boot, and Spring MVC

Thursday, September 16, 2021

How to compare objects on natural order in Java? Comparable + compareTo Example

Java allows you to sort your object in natural order by implementing a Comparable interface. It's one of the fundamental interfaces of Java API and is defined in java.lang package, which means you don't need to implement this unlike its counterpart Comparator, which is defined in java.util package.  Comparable is used to provide natural order of sorting to objects e.g. numeric order is a natural order for numbers, alphabetic order is a natural order for String and chronological order is natural for dates. Similarly when you define your own objects like Person, Book, or Employee, sorting them by name sounds natural. Similarly, for teams, ranking seems their natural order. It all depends on how the object is looked into in its domain.

Difference between Association, Composition and Aggregation in Java, UML and Object Oriented Programming

In Object-oriented programming, one object is related to another to use functionality and service provided by that object. This relationship between two objects is known as the association in object-oriented general software design and is depicted by an arrow in Unified Modelling Language or UML. Both Composition and Aggregation are the forms of association between two objects, but there is a subtle difference between composition and aggregation, which is also reflected by their UML notation. We refer to the association between two objects as Composition when one class owns other classes and other classes can not meaningfully exist, when the owner is destroyed.

How to Filter Stream and Collections in Java 8? Example Tutorial

Java 8 provides excellent features to support the filtering of elements in Java Collections. Prior to Java 8, the only better way to filter elements is by using a foreach loop or iterating over Collection using the Iterator and selecting the required object, leaving out rest. Though that approach work, it was very difficult to run them in parallel and take advantage of multiple CPUs available in modern-day servers. Java 8 provides Streams, which not only makes it easy to run any operation parallel but also supports lazy loading and lazy evaluation, which means as soon as the filtering condition is satisfied, it stooped doing work, doesn't matter how many objects the collection contains.