What is Python? Why Programmers Should Learn Python in 2019?

What is Python?

Python is an object-oriented programming language created by Guido Rossum in 1989. It is ideally designed for rapid prototyping of complex applications. It has interfaces to many OS system calls and libraries and is extensible to C or C++. Many large companies use the Python programming language include NASA, Google, YouTube, BitTorrent, etc.
Python programming is widely used in Artificial Intelligence, Natural Language Generation, Neural Networks and other advanced fields of Computer Science. Python had deep focus on code readability & this class will teach you python from basics.

Digital binary code concept.

Why Programmers Should Learn Python in 2019?

If you are thinking to learn Python but not sure why you should do that then here are 10 reasons which highlight the benefits of learning Python in 2019.

Though, the questions depend upon who is asking that i.e. for a beginner, learning Python makes sense because its simple and main reason for learning Python is simplicity.

Similarly, for an experienced programmer who is looking to go into Data Science and Machine learning, learning Python makes sense because it’s quickly becoming the most used programming language and there are powerful APIs and library available for AI, Data Science, and Machine learning.

Anyway, without any further ado, here are my 10 reasons to learn Python in 2019:

1. Data Science

This is the single, biggest reason why many programmers are learning Python in 2019. I know many of my friends who are bored with their Java programming jobs in Investment banks are learning Python on Simpliv to make a career in Data Science due to exciting work and high pay.

But, what makes Python a preferred language for Data Science and Machine Learning?Didn’t R was considered best for that not too long ago? Well, I think the libraries and framework Python offers e.g. PyBrain, NumPy and PyMySQL on AI, DataScience, and Machine learning are one of that reason.

Another reason is diversity, Python experience allows you to do a lot more than R e.g. you can create scripts to automate stuff, go into web development and so much more.

If you are interested in becoming a Data Scientist in 2019 and looking for pointers, I suggest you check out Data Science, Deep Learning, & Machine Learning with Python course on Simpliv. I have purchased this course and it’s one of the awesome resources. You can get it in less than $9 sometimes.

best data science course in Python

And if you need more choices, you can also take a look at this list of best Python Data Science courses for programmers.

2. Machine Learning

This is another reason why programmers are learning Python in 2019. The growth of machine learning is phenomenal in last a couple of years and it’s rapidly changing everything around us. Algorithms become sophisticated day by day, the best example is Google which can now answer what you are expecting.

If you are interested in machine learning, want to do a pet project or just want to play around, Python is the only major programming language which makes it easy.

Though there are machine learning libraries available in Java, you will find more content around Python as developer community is preferring Python over anything else on Data Science and Machine learning.

If you are interested in machine learning with Python, I suggest you to further check Machine Learning A-Z™: Hands-On Python & R In Data Science course on Simpliv

best machine learning course in Python

And if you need more options, here is another comprehensive list of machine learning courses for programmers.

3. Web Development

The good old development is another reason for learning Python. It offers so many good libraries and frameworks e.g. Django and Flask which makes web development really easy.

The task which takes hours in PHP can be completed in minutes on Python. Python is also used a lot for web scrapping. In fact, there is a Free Python course on Simpliv which will teach you that while teaching Python.

There are a lot of using Python web development frameworks like Django and Flask which can help you quickly create your web application in no time.


4. Simplicity

This is the single biggest reason for beginners to learn Python. When you first start with programming and coding, you don’t want to start with a programming language which has tough syntax and weird rules.

Python is both readable and simple. It also easier to setup, you don’t need to deal with any class path problems like Java or compiler issues like C++.

Just install Python and you are done. While installing it will also ask you to add Python in PATH which means you can run Python from anywhere on your machine.

5. Big Community

You need a community to learn a new technology and friends are your biggest asset when it comes to learning a programming language. You often get stuck with one or other issue and that time you need helping hand.

Thanks to Google, you can find the solution of your any Python related problem in minutes. Communities like StackOverflow also brings many Python experts together to help newcomers.

6. Libraries and Frameworks

One of the similarities between Python and Java is the sheer number of open source libraries, frameworks, and modules available to do whatever you want to do. It makes application development really easy.

Just imagine creating a web application without Spring in Java or Django and Flask in Python. It makes your job simple as you only need to focus on business logic.

Python has numerous libraries for different needs. Django and Flask are two of the most popular for web development and NumPy and SciPy are for Data Science.  If you want to learn more, here is a list of 8 Useful Python Machine learning libraries.


7. Automation

When I first come to know about Python was due to one of my scripting need. I was working with an application which receives messages over UDP and there was a problem, we were not seeing messages in the log.

I wanted to check if we are receiving any UDP traffic on that box and that port or not but I couldn’t find a handy UNIX command to do that. My friend who sits next to me was learning Python and he wrote a utility in just 5 minutes to intercept UDP message using one of the Python modules.

Obviously, I was impressed with the time it took for him to write such a tool but that just highlights the power of Python when it comes to writing scripts, tool and automating stuff.

If you seriously want to know how much Python help with automation, my favorite place is the Automate boring stuff with Python book, simply awesome book.

best book to learn Python


8. Multipurpose

One of the things I like about Python is its Swiss Army knife nature. It’s not tied to just one thing e.g. R which is good on Data Science and Machine learning but nowhere when it comes to web development. Learning Python means you can do many things.

You can create your web applications using Django and Flask, Can do Data Analysis using NumPy, Scipy, Scikit-Learn, and NLTK. At a bare minimum, you can use Python to write scripts to automate many of your days to day tasks.

9. Jobs and Growth

Python is growing really fast and big time and it makes a lot of sense to learn a growing programming major programming language if you are just starting your programming career.

It not only help you to get a job quickly but also it will also accelerate your career growth. IMHO, for beginners, after simplicity, this should be the most important reason to learn Python

10. Salary

Python developers are one of the highest paid developers, particularly in the Data Science, Machine learning and web development. On average also, they are very good paying, ranging from 70K USD to 150K USD depending upon their experience, location, and domain.

Why learn Python in 2019

Useful Resources to Learn Python

If you decide to learn Python in 2019 then here are some of the useful Python books, courses, and tutorials to start your journey in the beautiful world of Python.

Top 10 Python Books for Beginners & Advanced Programmers 2019

And if you are still not convinced about learning Python then look at this image, it correctly shows the life of a Python developer:

10 Reasons to Learn Python Programming in 2018

That’s all about some of the important reasons to learn Python in 2019. As I said, it’s important to know to code in today’s world and if you don’t know coding you are missing something and Python is a great way to start learning to code.

For programmers who already know Java or C++, learning Python not just make you a Polyglot programmer but also gives you a powerful tool in your arsenal to write scripts, create a web application and open door on exciting field of Data Science and Machine Learning.

In short, if you could learn just one programming language in 2019 then make it to Python and to start with, The Complete Python MasterClass is the best course.

Thanks for reading this article so far. If you decide to learn Python in 2019 than its a great decision and I wish you all the best for your journey.


Top 10 Python Books for Beginners & Advanced Programmers 2019

Python is a general-purpose interpreted programming language used for web development, machine learning, and complex data analysis. Python is a perfect language for beginners as it is easy to learn and understand. As the popularity of the language is soaring, the opportunities in Python programming are amplifying as well. If you wish to learn Python programming, there are plenty of books available in the market. Books provide you the ability to learn at your on time even if you are on the go and they go really in detail. We bring to you a list of 10 best Python books for beginners and advanced programmers. These books will help programmers of all skill levels, from amateurs to code wizards. The list also includes a few free Python books for beginners.

Best Python Books for Beginners

Python Crash Course

‘Python Crash Course’ by Eric Matthews is a fast-paced and comprehensive introduction to Python language for beginners, who wish to learn Python programming and write useful programs. The book aims to get you up to speed fast enough and have you writing real programs in no time at all. This book is also for programmers who have a vague understanding of the language and wish to brush up their knowledge before trying their hands on Python programming. As you work through the book, you will learn the use of libraries and tools such as Numpy and matplotlib and work with data to create stunning visualizations. You will also learn about the idea behind 2d games and Web applications and how to create them.

This 560 pages long book is majorly dissected into two parts. The first part of the book discusses the basics of Python programming and sheds lights on concepts such as dictionaries, lists, loops, and classes. You will understand the working of a Python program and learn how to write clean and readable code which creates interactive programs. The part ends with the topic of how to test your code before you add it to a project. The second part of the book follows a practical approach and will help you test your knowledge by presenting three different projects, an arcade game, a simple web application and data visualizations using Python’s libraries.

Head-First Python (2nd edition)

‘Head-First Python’ by Paul Barry is a quick and easy fix for you if you wish to learn the basics of Python programming without having to slog through counterproductive tutorials and books. The book will help you in gaining a quick grasp of the fundamentals of Python programming and working with built-in functions and data structures. The book then moves to help you build your own web application, exception handling, data wrangling, and other concepts. Head first Python makes use of a visual format rather than a text-based approach, helping you to see and learn better.

The author is Paul Barry, a lecturer at the Institute of Technology, Carlow, Ireland. Before entering the academic world, he worked for over a decade in the IT industry. He is the author of certain well-known programming books, such as Programming the Network with Perl, Head First Programming and Head First Python.


Learn Python the Hard Way (3rd Edition)

‘Learn Python the Hard Way’ by Zed A. Shaw (3rd Edition) is a collection of 52 perfectly collated exercises. You will have to read the code and type it precisely. Once typed, you will have to fix the mistakes in the code for a better understanding and watch the programs run. These exercises will help you understand the working of software, structure of a well-written program and how to avoid and find common mistakes in code using some tricks that professional programmers have up their sleeves.

The book begins it all by helping you install a complete Python environment, which helps you in writing optimized code. The book then discusses various topics, such as basic mathematics, variables, strings, files, loops, program design, and data structures among many others. The book is ideal for beginners who wish to learn Python programming through the crux of the language. The author is Zed A. Shaw, who is the creator of the Hard Way series which includes books on C, Python and Ruby programming language.

Python Programming: An Introduction to Computer Science (3rdEdition)

‘Python Programming’ by John Zelle is the third edition of the original Python programming book published in 2004, the second edition of which was released in 2010. Instead of treating this book as a source to Python programming, it should be taken as an introduction to the art of programming. This book will introduce you to computer science, programming, and other concepts, only using Python language as the medium for beginners. The book will discuss its contents in a style that is most suitable for beginners, who will find the concepts in the book easy to understand and interesting.

The third edition of this extremely successful book follows the path paved by the first edition and continues to test students through a time-tested approach while teaching introductory computer science. The most notable change in this edition is the removal of nearly every use of python eval() library and the addition of a section which discusses its negatives. The latest version also uses new graphic examples.

Free Python Books for Beginners

Learning with Python: How to Think Like a Computer Scientist

‘Learning with Python’ by Allen Downey, Jeff Elkner and Chris Meyers is an introduction to Python programming and using the language to create wonderful real-world programs. The book is divided into 20 sections and also includes a contributors list and a way forward. The initial sections discuss the basics of programming and what makes up a program. Then it moves on to basic Python concepts such as variables, functions, conditionals, fruitful functions and iteration. Towards the end, the book discusses the core concepts such as objects, inheritance, lists, stacks, queues, trees and debugging.

The book is available for free in a variety of formats, which include PDF, Postscript, Gzipped Rar and HTML. Users are free to download and print these files as the book is licensed under the GNU Free Documentation License. The book has also been translated in Spanish, Italian, German and Czech, and available for download.

A Byte of Python

‘A Byte of Python’ by C.H. Swaroop is a free book on Python programming with an aim to guide the beginner audience to an understanding of the Python language. The book will discuss the Python 3 version majorly, but will also help you adapt to the older versions of the language. The book is available in over 26 languages including Turkish, Swedish, French, Chinese, German, Spanish, Russian, Ukrainian, Portuguese and Korean. The translations have been provided by active community members who vigorously work to keep the edits going on as the book is updated.

The book initiates its approach with an introduction to what the book is about and what it demands from the readers concerning dedication. Then it describes Python and how it has emerged as one of the most powerful languages in the programming world. It then moves on to Python concepts and describes them in detail along with examples at every step. It culminates with how you can continue learning Python after reading this book and leaves you with a problem to solve, testing your skills even at the last step.


Best Python Books Advanced Programmers

Introduction to Machine Learning with Python: A Guide for Data Scientists

Many commercial applications and projects have employed machine learning as an integral ingredient, and the number of applications doing so has only risen over the years. This book by Sarah Guido and Andreas C. Muller will teach you how to use Python programming language to build your own machine learning solutions. As the amount of data usage increases with the second, the limitation to machine learning applications is only our imagination.

Throughout the course of this book, you will learn about the steps required to create a rich machine-learning application using Python and scikit-learn library. The book will introduce you to the fundamental concepts and uses of machine learning, before moving on to the pros and cons of popular machine learning algorithms. You will then learn about the advanced methods for model evaluation and the concept of pipelines, which is used for encapsulating your workflow and chaining models. In conclusion, the book will provide suggestions to help you improve your data science skills.


Fluent Python: Clear, Concise, and Effective Programming

‘Fluent Python’ by Luciano Ramalho will be your hands-on-guide that will help you learn how to write effective Python code by using the most neglected yet best features of the language. The author will take you through the features and libraries of the language, and will help you make the code shorter, faster and readable.

The book covers various concepts including python data model, data structures, functions as objects, object-oriented idioms, control flow, and metaprogramming. Using this book, advanced Python programmers will learn about Python 3 and how to become proficient in this version of the language. The author is Luciano Ramalho, a Web Developer who has worked with some of the largest news portals in Brazil using Python and has his own Python training company.

Python Cookbook: Recipes for Mastering Python 3

‘Python Cookbook’ by David Beazley and Brian K. Jones will help you master your programming skills in Python 3 or help you update older Python 2 code. This cookbook is filled with recipes tried and tested with Python 3.3 is the ticket for experienced Python programmers who wish to take the approach to modern tools and idioms rather than just standard coding. The book has complete recipes for a variety of topics, covering Python language and its uses, along with tasks common to a large number of application domains.

Some of the topics covered in the book are but not limited to strings, data structures, iterators, functions, classes, modules, packages, concurrency, testing, debugging and exceptions. Throughout the book, the recipes mentioned above will presuppose that you have the necessary knowledge to understand the topics in the book. Each recipe contains sample code the reader can use in their projects. The code is followed by a discussion about the working of the code and why the solution works.


Programming Python: Powerful Object-Oriented Programming

‘Programming Python’ by Mark Lutz is ideal for programmers who have understood the fundamentals of Python programming and ready to learn how to use their skills to get real work done. This book includes in-depth tutorials on various application domains of Python, such as GUIs, the Web and system administration. The book will also discuss how the language is used in databases, text processing, front-end scripting layers, networking and much more.

he book will explain the commonly used tools, language syntax, and programming techniques through a brief yet clear approach. The book is filled with many examples that show the correct usage and common idioms. The book also digs into the language as a software development tool, along with multiple examples illustrated particularly for that purpose.


If you are looking for online Python tutorials or courses, then http://www.simpliv.com has a great list of community-curated and recommended top Python tutorials: Python tutorials and courses

Best 10 Reasons Why You Should Learn Java

Java is one of the most fundamental programming languages that anyone can pick up. It is so simple at the same time, the possibility of what you can develop using Java, is infinite! This is what makes Java the most widely used language in the industry today with Java Certification being a key skill that employers constantly look out for. Through this blog, I will be listing down the top 10 reasons to learn Java.

  1. Java is easy & Open Source
  2. Java New Features
  3. Java EE & its rich API
  4. Tons of resources & Community Support
  5. Java Applications
  6. Java Development Tools
  7. Demand: Java is everywhere
  8. Java is an Object Oriented Programming Language
  9. Java is Portable & Versatile
  10. Java’s Popularity & High Salary

Let’s get started by understanding all the above points in the reverse order.

1. Java is Easy & Open Source

At number 10, Java is extremely easy and open source. It supports FLOSS philosophy where you don’t have to pay a single penny to write codes in Java.
So what are the reasons that contribute to its simplicity? Java is:

Easy - Data Science Tutorial - Edureka

  • Concurrent: Easy to process your data parallelly
  • Platform Independent (WORA): Write Once and Run Anywhere
  • Open Source: Create Java applications at absolutely no cost
  • Robust: Strong memory management
  • Interpreted
  • High Performance
  • Secured
  • Dynamic

Furthermore, Java has made our life easier by removing all the complexities such as pointers, operator overloading as you see in C++ or any other programming language.

2. Java New Features

ProjectJigsaw - Top 10 reasons to learn Java - Edureka

The release of Java 9, 10 and its features is a milestone in the Java ecosystem. I have picked up a few new Java9 features, which I feel are worth knowing about.
The very first is the project Jigsaw. The main aim of this project is to introduce the concept of modularity, support for creating modules and then apply the same to JDK.

Also, REPL tool has been introduced which makes it quite easy to try different features. Along with that, you also have Jshell scripting where you can actually write this in a single go and thereby making it quite easy.

So these new additions to Java help you to write simple code and test them up.

3. Java EE & its Rich API

API - top 10 reasons to learn Java - EdurekaNow the reason API is quite popular, it becomes very easy for a programmer to build an application as well as use different technologies without actually knowing how their internal implementation works out.

    • Coming to Java API, it has no issues with the compatibility and it handles a wide set of procedures and functions.
    • Also, you’ll be impressed that, there are over 4,500 API available for developers.
    • It provides API for I/O, networking, utilities, XML parsing, DB connection and almost everything!

You can go through the complete list of Java API’s that are associated as part of Java 10 here.

4. Tons of Resources & Community Support


Course Curriculum

Java, J2EE & SOA Certification Training

  • Instructor-led Sessions
  • Real-life Case Studies
  • Assignments
  • Lifetime Access

Community - top 10 reasons to learn java - Edureka

Java as a programming language is Omnipresent, which means it is present everywhere, starting from your phone to your setup box, to satellites as well.

So, there is a huge job opportunity once you grasp Java completely.

Then Java has a wonderful support community. So learning is not at all a problem with Java.

You have numerous resources available online that can act as your perfect companion, along with a support community. You have multiple forums, where all the doubts or errors related to Java are answered.

5. Java Applications

JavaApplications - top 10 reasons to learn java - Edureka

Well as I have mentioned above, Java is everywhere and it has an ocean of opportunities!

Now, let me take you through some of the technologies which make use of Java. Here I have selected some of the influenced domains which use Java.

      • Develop web application & its popular frameworks(Spring, hibernate etc.)
      • Java is used in Android APP development
      • Java is used to test your web application using various automation testing tool. Ex: Selenium, QTP which is used to automate web applications and perform testing using Java.
      • Big Data technology: Hadoop MapReduce framework is written in Java
      • Used in Scientific & Research Communities to handle a huge amount of data

6. Java Development Tools

java - top 10 reasons to learn java - Edureka


Now you have many powerful development tools in which you can do Java programming.

Some of the popular Java development tools are:

1.  Netbeans

2.  IntelliJ

3.  Eclipse

4.  Android Studio

All of the above tools not only help you in the code writing process but it also offers a high-level debugging to the programmers.

7. Java is Everywhere

Java is all over the place, it’s on the desktop, it’s on mobile, and everywhere! Here I have listed down few departments where Java has been explicitly used:

CompaniesUsingJava - top 10 reasons to learn java - Edureka

  • Banking: To deal with transaction management
  • Information Technology: Solve implementation dependencies and this is the domain that hires most of the Java developers.
  • Stock market: To write algorithms as to which company they should invest in
  • Financial services: Java is used in server-side applications

So, it is not limited to just one domain! Also, it is being used by many big giants such as Google, Philips, CapitalOne, Accenture, Uber and many more.

So, you can be completely assured that Java is not going anywhere soon!

8. Java is an OOPS Language

Most popular programming languages like Java, C++, C#, Ruby, etc. follow an object-oriented programming paradigm.

Object Oriented programming is a programming style which is associated with the concepts such as:
1. Classes
2. Objects
3. Inheritance
4. Encapsulation
5. Polymorphism

An object-based application in Java is based on declaring classes, creating objects from them and interaction between these objects. Hence, Java Being an Object Oriented Programming language, the concepts of Java are highly relatable.

9. Portable & Versatile

Java is extremely portable as well as a versatile language. By portable, I mean Java can be used across various platforms. Being an open source programming language, it is platform independent across OS. As its famous tagline says “Write Once and Run Anywhere”, you can run Java bytecode on any hardware that has a compliant JVM. Example: you can simply write your code or create Java applications in a Windows environment and run on any other environment, let’s say Linux etc.

Next, Java is said as one of the most versatile languages. Now, there are many reasons behind it. First of all, it has dynamic coding,  all the codes are organized and stored in an object-oriented format known as classes. Then it is highly secured. Next, it can easily work with different resources across a network. This makes Java network-concentric and a language which is not going out of the date anytime soon.

Next coming to last but not the least is Java’s popularity & high SALARY!

10. Java’s Popularity & High Salary

Java developers are the ones who acquire high paying jobs in the industry. The average Java Developer earns around 110,000$ per year in the United States.

Course Curriculum

Java, J2EE & SOA Certification Training

Weekday / Weekend Batches

Apart from this, you can refer this TIOBE programming index for all the present trending programming languages.

TiobeIndex - top 10 reasons to learn java - Edureka

So, here you can see how Java has dominated this field from the early 2000’s to present 2018. This in itself should give you an idea of how popular Java is and how widely it is being used in the industry.

So these were my top 10 reasons to learn Java. If you have any other reason in your mind, you can mention it in the comment section.

I hope my blog on “Top 10 reasons to learn Java” was relevant for you. To get in-depth knowledge of Java along with its various applications, check out our interactive, live-online Simpliv Java Certification Training here, that comes with 24*7 support to guide you throughout your learning period.

Top 20 Java Interview Programs For Programming And Coding Interview

In this tutorial, we have provided a big list of basic Java interview programs with actual logical code examples asked in Programming and Coding Interviews for freshers and experienced candidates.

Important and basic Java programs that are generally asked in the technical round of Java and Automation Interviews.

This has now become a general practice by the interviewers to ask basic Java Programs in interviews rather than just focusing on theoretical aspects. 

For this, we have come up with an idea of listing down a few very important Java Programs along with the proper explanation of each program.

Moreover, we have also included the respective outputs which will give you a fair idea about how that program worked. The flow of the program and the concepts are properly explained wherever possible throughout this article.

Most Popular Java Programming Interview Questions

A list of the most popular Java Programming interview questions and answers are explained below and these questions will help you to clear any Automation Interview successfully.

Recommended Read => We have covered Core Java Interview Questions in earlier articles here.

Q #1) Write a Java Program to reverse a string without using String inbuilt function.

Answer: Here, we are initializing a string variable str and are making use of the string builder class.

The object of the string builder class str2 will be further used to append the value stored in the string variable str.
Thereafter, we are using the inbuilt function of string builder (reverse()) and storing the new reversed string in str2.

Finally, we are printing str2.

1 public class FinalReverseWithoutUsingStringMethods {
3           public static void main(String[] args) {
4                    // TODO Auto-generated method stub
5                    String str = "Automation";
6                    StringBuilder str2 = new StringBuilder();
7                    str2.append(str);
8                    str2 = str2.reverse();     // used string builder to reverse
9                    System.out.println(str2);
10           }
12 }



Q #2) Write a Java Program to reverse a string without using String inbuilt function reverse().


Method 1:

There are several ways with which you can reverse your string if you are allowed to use the other string inbuilt functions.

In this method, we are initializing a string variable called str with the value of your given string. Then, we are converting that string into character array with toCharArray() function. Thereafter, we are using for loop to iterate between each character in reverse order and printing each character.

1 public class FinalReverseWithoutUsingInbuiltFunction {
2     public static void main(String[] args) {
3         String str = "Saket Saurav";
4         char chars[] = str.toCharArray();  // converted to character array and printed in reverse order
5         for(int i= chars.length-1; i>=0; i--) {
6             System.out.print(chars[i]);
7         }
8     }
9 }


varuaS tekaS

Method 2:

This is another method in which you are declaring your string variable str and then using Scanner class to declare an object with predefined standard input object.

This program will accept the string value through the command line (when executed).

We have used nextLine() which will read the input with the spaces between the words of a string. Thereafter, we have used a split() method to split the string into its substrings(no delimiter given here). Finally, we have printed the string in reverse order using for loop.

1 import java.util.Scanner;
3 public class ReverseSplit {
5     public static void main(String[] args) {
6         // TODO Auto-generated method stub
7         String str;
8         Scanner in = new Scanner(System.in);
9         System.out.println("Enter your String");
10         str = in.nextLine();
11         String[] token = str.split("");    //used split method to print in reverse order
12         for(int i=token.length-1; i>=0; i--)
13         {
14             System.out.print(token[i] + "");
15         }
17     }
19 }


Enter your String

Method 3:

This is almost like method 2, but here we did not use the split() method. We have used the scanner class and nextLine() for reading the input string. Then, we have declared an integer length which has the length of the input string.

Thereafter, we have printed the string in the reverse order using for loop. However, we have used charAt(index) method which will return the character at any specific index. After each iteration, the character will be concatenated to reverse the string variable.

Finally, we have printed the reverse string variable.

1 import java.util.Scanner;
3 public class Reverse {
5     public static void main(String[] args) {
6         // TODO Auto-generated method stub
7         String original, reverse = "";
8         System.out.println("Enter the string to be reversed");
9         Scanner in = new Scanner(System.in);
10         original = in.nextLine();
11         int length = original.length();
12         for(int i=length-1; i>=0; i--) {
13             reverse = reverse + original.charAt(i);   //used inbuilt method charAt() to reverse the string
14         }
15         System.out.println(reverse);
16     }
18 }


Enter the string to be reversed
automation testing
gnitset noitamotua

Q #3) Write a Java Program to swap two numbers with using the third variable.

Answer: In this Example, we have made use of the Scanner class to declare an object with a predefined standard input object. This program will accept the values of x and y through the command line (when executed).

We have used nextInt() which will input the value of an integer variable ‘x’ and ‘y’ from the user. A temp variable is also declared.

Now, the logic of the program goes like this – we are assigning temp or third variable with the value of x, and then we are assigning x with the value of y and again we are assigning y with the value of temp. So, after the first complete iteration, the temp will have a value of x, x will have a value of y and y will have a value of temp (which is x).

1 import java.util.Scanner;
3 public class SwapTwoNumbers {
5     public static void main(String[] args) {
6         // TODO Auto-generated method stub
7         int x, y, temp;
8         System.out.println("Enter x and y");
9         Scanner in = new Scanner(System.in);
10         x = in.nextInt();
11         y = in.nextInt();
12         System.out.println("Before Swapping" + x + y);
13         temp = x;
14         x = y;
15         y = temp;
16         System.out.println("After Swapping" + x + y);
18     }
20 }


Enter x and y
Before Swapping4598
After Swapping9845

Q #4) Write a Java Program to swap two numbers without using the third variable.

Answer: Rest all things will be the same as the above program. Only the logic will change. Here, we are assigning x with the value x + y which means x will have a sum of both x and y.

Then, we are assigning y with the value x – y which means we are subtracting the value of y from the sum of (x + y). Till here, x still has the sum of both x and y. But y has the value of x.

Finally, in the third step, we are assigning x with the value x – y which means we are subtracting y (which has the value of x) from the total (x + y). This will assign x with the value of y and vice versa.

1 import java.util.Scanner;
3 class SwapTwoNumberWithoutThirdVariable
4 {
5    public static void main(String args[])
6    {
7       int x, y;
8       System.out.println("Enter x and y");
9       Scanner in = new Scanner(System.in);
11       x = in.nextInt();
12       y = in.nextInt();
14       System.out.println("Before Swapping\nx = "+x+"\ny = "+y);
16       x = x + y;
17       y = x - y;
18       x = x - y;
20       System.out.println("After Swapping without third variable\nx = "+x+"\ny = "+y);
21    }
22 }


Enter x and y
Before Swapping
x = 45
y = 98
After Swapping without a third variable
x = 98
y = 45

Q #5) Write a Java Program to count the number of words in a string using HashMap.

Answer:  This is a collection class program where we have used HashMap for storing the string.

First of all, we have declared our string variable called str. Then we have used split() function delimited by single space so that we can split multiple words in a string.

Thereafter, we have declared HashMap and iterated using for loop. Inside for loop, we have an if else statement
in which wherever at a particular position, the map contains a key, we set the counter at that position and add the object to the map.

Each time, the counter is incremented by 1. Else, the counter is set to 1.

Finally, we are printing the HashMap.

Note: The same program can be used to count the number of characters in a string. All you need to do is to remove one space (remove space delimited in split method) in String[] split = str.split(“”);

1 import java.util.HashMap;
3 public class FinalCountWords {
5     public static void main(String[] args) {
6         // TODO Auto-generated method stub
7         String str = "This this is is done by Saket Saket";
8         String[] split = str.split(" ");
9         HashMap<String,Integer> map = new HashMap<String,Integer>();
10         for (int i=0; i<split.length-1; i++) {
11             if (map.containsKey(split[i])) {
12                 int count = map.get(split[i]);
13                 map.put(split[i], count+1);
14             }
15             else {
16                 map.put(split[i], 1);
17             }
18         }
19         System.out.println(map);
20     }
22 }


{Saket=1, by=1, this=1, This=1, is=2, done=1}

Q #6) Write a Java Program to iterate HashMap using While and advance for loop.

Answer: Here we have inserted three elements in HashMap using put() function.

The size of the map can get using size() method. Thereafter, we have used While loop for iterating through the map which contains one key-value pair for each element. Keys and Values can be retrieved through getKey() and getValue().

Likewise, we have used advanced for loop where we have “me2” object for the HashMap.

1 import java.util.HashMap;
2 import java.util.Iterator;
3 import java.util.Map;
5 public class HashMapIteration {
7     public static void main(String[] args) {
8         // TODO Auto-generated method stub
9         HashMap<Integer,String> map = new HashMap<Integer,String>();
10         map.put(2"Saket");
11         map.put(25"Saurav");
12         map.put(12"HashMap");
13         System.out.println(map.size());
14         System.out.println("While Loop:");
15         Iterator itr = map.entrySet().iterator();
16         while(itr.hasNext()) {
17             Map.Entry me = (Map.Entry) itr.next();
18             System.out.println("Key is " + me.getKey() + " Value is " + me.getValue());
19         }
20         System.out.println("For Loop:");
21         for(Map.Entry me2: map.entrySet()) {
22             System.out.println("Key is: " + me2.getKey() + " Value is: " + me2.getValue());
23         }
24     }
26 }


While Loop:
Key is 2 Value is Saket
Key is 25 Value is Saurav
Key is 12 Value is HashMap
For Loop:
Key is: 2 Value is: Saket
Key is: 25 Value is: Saurav
Key is: 12 Value is: HashMap

Q #7) Write a Java Program to find whether a number is prime or not.

Answer:  Here, we have declared two integers temp and num and used Scanner class with nextInt(as we have integer only).

One boolean variable isPrime is set to true. Thereafter, we have used for loop starting from 2, less than half of the number are entered and incremented by 1 for each iteration. Temp will have remainder for every iteration. If the remainder is 0, then isPrime will be set to False.

Based on isPrime value, we are coming to the conclusion that whether our number is prime or not.

1 import java.util.Scanner;
3 public class Prime {
5     public static void main(String[] args) {
6         // TODO Auto-generated method stub
7         int temp, num;
8         boolean isPrime = true;
9         Scanner in = new Scanner(System.in);
10         num = in.nextInt();
11         in.close();
12         for (int i = 2; i<= num/2; i++) {
13             temp = num%i;
14             if (temp == 0) {
15                 isPrime = false;
16                 break;
17             }
18         }
19         if(isPrime)
20             System.out.println(num + "number is prime");
21             else
22                 System.out.println(num + "number is not a prime");
25     }
27 }


445number is not a prime

Q #8) Write a Java Program to find whether a string or number is palindrome or not.

Answer:  You can use any of the reverse string program explained above to check whether the number or string
is palindrome or not.

What you need to do is to include one if-else statement. If the original string is equal to a reversed string then the number is a palindrome, otherwise not.

1 import java.util.Scanner;
3 public class Palindrome {
4     public static void main (String[] args) {
5         String original, reverse = "";
6         Scanner in = new Scanner(System.in);
7         int length;
8         System.out.println("Enter the number or String");
9         original = in.nextLine();
10         length = original.length();
11         for (int i =length -1; i>=0; i--) {
12             reverse = reverse + original.charAt(i);
13         }
14         System.out.println("reverse is:" +reverse);
16         if(original.equals(reverse))
17             System.out.println("The number is palindrome");
18         else
19             System.out.println("The number is not a palindrome");
21     }
22 }


For String-

Enter the number or String
reverse is:yajiv
The number is not a palindrome

For Number-

Enter the number or String
reverse is:99
The number is palindrome

Q #9) Write a Java Program for Fibonacci series.

Answer: Fibonacci series is a series of numbers where after the initial two numbers, every occurring number is the sum of two preceding numbers.

For Example 0,1,1,2,3,5,8,13,21………

In this program, we have used Scanner class again with nextInt (discussed above). Initially, we are entering (through command line) the number of times the Fibonacci has to iterate. We have declared integer num and initialized a,b with zero and c with one. Then, we have used for loop to iterate.

The logic goes like a is set with the value of b which is 0, then b is set with the value of c which is 1. Then, c is set with the sum of both a and b.

1 import java.util.Scanner;
3 public class Fibonacci {
4     public static void main(String[] args) {
5         int num, a = 0,b=0, c =1;
6         Scanner in = new Scanner(System.in);
7         System.out.println("Enter the number of times");
8         num = in.nextInt();
9         System.out.println("Fibonacci Series of the number is:");
10         for (int i=0; i<=num; i++) {
11             a = b;
12             b = c;
13             c = a+b;
14             System.out.println(a + "");    //if you want to print on the same line, use print()
15         }      
16     }
17 }

Enter the number of times
Fibonacci Series of the number is:

Q #10) Write a Java Program to iterate ArrayList using for-loop, while-loop, and advance for-loop.

Answer:  In this program, we have inserted three elements and printed the size of the ArrayList.

Then, we have used While Loop with an iterator. Whenever the iterator has (next) element, it will display that element until we reach the end of the list. So it will iterate three times.

Likewise, we have done for Advanced For Loop where we have created an object called obj for the ArrayList called list. Then printed the object.

Thereafter, we have put the condition of For Loop where the iterator i is set to 0 index, then it is incremented by 1 until the ArrayList limit or size is reached. Finally, we have printed each element using a get(index) method for each iteration of For Loop.

1 import java.util.*;
3 public class arrayList {
4     public static void main(String[] args) {
5         ArrayList list = new ArrayList();
6         list.add("20");
7         list.add("30");
8         list.add("40");
9         System.out.println(list.size());
10         System.out.println("While Loop:");
11         Iterator itr = list.iterator();
12         while(itr.hasNext()) {
13             System.out.println(itr.next());
14         }
15         System.out.println("Advanced For Loop:");
16         for(Object obj : list) {
17             System.out.println(obj);
18     }
19         System.out.println("For Loop:");
20         for(int i=0; i<list.size(); i++) {
21             System.out.println(list.get(i));
22         }
23 }
24 }


While Loop:
Advanced For Loop:
For Loop:

Q #11) Write a Java Program to demonstrate explicit wait condition check.

Answer: There are two main types of wait – implicit and explicit. (We are not considering Fluent wait in this program)

Implicit wait is those waits which are executed irrespective of any condition. In the below program, you can see that it is for Google Chrome and we have used some inbuilt methods to set the property, maximizing window, URL navigation, and web element locating.

1 WebDriverWait wait = new WebDriverWait(driver, 20);
2 WebElement element2 = wait.until(ExpectedConditions.visibilityOfElementLocated(By.partialLinkText("Software testing - Wikipedia")));
3 element2.click();

In the above piece of code, you can see that we have created an object wait for WebDriverWait and then we have searched for WebElement called element2.

The condition is set in such a way that webdriver will have to wait until we see the link “Software testing – Wikipedia” on a web page. It won’t execute if it does not find this link. If it does, then it will do a mouse click on that link.

1 package Codes;
2 import java.util.concurrent.TimeUnit;
3 import org.openqa.selenium.By;
4 import org.openqa.selenium.WebDriver;
5 import org.openqa.selenium.WebElement;
6 import org.openqa.selenium.chrome.ChromeDriver;
7 import org.openqa.selenium.chrome.ChromeOptions;
8 import org.openqa.selenium.support.ui.ExpectedConditions;
9 import org.openqa.selenium.support.ui.WebDriverWait;
11 public class explicitWaitConditionCheck {
13            public static void main(String[] args) {
14                     // TODO Auto-generated method stub
15                     System.setProperty("webdriver.chrome.driver""C:\\webdriver\\chromedriver.exe");
16                    ChromeOptions options = new ChromeOptions();
17                    options.addArguments("--disable-arguments");
18                    WebDriver driver = new ChromeDriver();
19                    driver.manage().window().maximize();
20                    driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
21                    driver.navigate().to("https://www.google.com");
22                    WebElement element = driver.findElement(By.name("q"));
23                     element.sendKeys("Testing");
24                     element.submit();
25                     WebDriverWait wait = new WebDriverWait(driver, 20);
27                      WebElement element2 = wait.until(ExpectedConditions.visibilityOfElementLocated(By.partialLinkText("Software testing - Wikipedia")));
28 element2.click();
29 }}

Q #12) Write a Java Program to demonstrate Scroll up/ Scroll down.

Answer:  All the lines of codes are easily relatable as we have discussed in our previous example.

However, in this program, we have included our JavascriptExecutor js which will do the scrolling. If you see the last line of the code, we have passed window.scrollBy(arg1,arg2).

If we want to scroll up then pass some value in arg1 if you want to scroll down then pass some value in arg2.

1 package Codes;
3 import java.util.concurrent.TimeUnit;
5 import org.openqa.selenium.By;
6 import org.openqa.selenium.JavascriptExecutor;
7 import org.openqa.selenium.Keys;
8 import org.openqa.selenium.WebDriver;
9 import org.openqa.selenium.WebElement;
10 import org.openqa.selenium.chrome.ChromeDriver;
12 public class ScrollDown {
14           public static void main(String[] args) {
15                    // TODO Auto-generated method stub
16                    System.setProperty("webdriver.chrome.driver""C:\\webdriver\\chromedriver.exe");
17                    WebDriver driver = new ChromeDriver();
18                    JavascriptExecutor js = (JavascriptExecutor) driver;
19                    driver.manage().window().maximize();
20                    driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
21                    driver.get("https://www.google.com");
22                    WebElement element = driver.findElement(By.name("q"));
23                    element.sendKeys("SoftwareTestingHelp");
24                    element.sendKeys(Keys.ENTER);
25                     js.executeScript("window.scrollBy(0,1000)");
27 }
29 }

Q #13) Write a Java Program to open all links of gmail.com.

Answer:  It is a typical example of advanced for loop which we have seen in our previous programs.

Once you have opened a website such as Gmail using get() or navigate().to(), you can use a tagName locator to find the tag name of a website which will return all the tags.

We have advanced for loop where we have created a new WebElement link2 for a link(which already has located
all the tags), then we have got all the links through getAttribute(“href”) and got all the texts through getText().

1 package Codes;
3 import java.util.concurrent.TimeUnit;
5 import org.openqa.selenium.By;
6 import org.openqa.selenium.WebDriver;
7 import org.openqa.selenium.WebElement;
8 import org.openqa.selenium.chrome.ChromeDriver;
10 public class openAllLinks {
12         public static void main(String[] args) {
13         // TODO Auto-generated method stub
14         System.setProperty("webdriver.chrome.drive""C:\\webdriver\\chromedriver.exe");
15         WebDriver driver = new ChromeDriver();
16         driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
17         driver.manage().window().maximize();
18         driver.get("https://www.gmail.com/");
19         java.util.List<WebElement> link = driver.findElements(By.tagName("a"));
20        System.out.println(link.size());
22        for (WebElement link2: link) {
24        //print the links i.e. http://google.com or https://www.gmail.com
25       System.out.println(link2.getAttribute("href"));
27       //print the links text
28      System.out.println(link2.getText());
29 }
30 }
31 }


Starting ChromeDriver 2.38.551601 (edb21f07fc70e9027c746edd3201443e011a61ed) on port 16163
Only local connections are allowed.
Learn more

Q #14) Write a Selenium code to switch to the previous tab.

Answer:  We have demonstrated the use of the Robot class. We see this as an important third party because we can achieve the different navigation within a browser and its tabs if you know the shortcut keys.

For example, if you have three tabs open in your chrome and you want to go to the middle tab, then you have to press control + 2 from your keyboard. The same thing can be achieved through the code as well.

Observe the following code (just after we see the instantiation of Robot class). we have used Robot class object called a robot with two inbuilt methods keyPress(KeyEvenet.VK_*) and keyRelease(KeyEvenet.VK_*).

1 package Codes;
3 import java.awt.AWTException;
4 import java.awt.Robot;
5 import java.awt.event.KeyEvent;
6 import java.util.concurrent.TimeUnit;
7 import org.openqa.selenium.By;
8 import org.openqa.selenium.Keys;
9 import org.openqa.selenium.WebDriver;
10 import org.openqa.selenium.WebElement;
11 import org.openqa.selenium.chrome.ChromeDriver;
12 public class PreviousTab {
13           public static void main(String[] args) throws AWTException {
14                // TODO Auto-generated method stub
15               System.setProperty("webdriver.chrome.driver""C:\\webdriver\\chromedriver.exe");
16              WebDriver driver = new ChromeDriver();
17              driver.manage().window().maximize();
18              driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
19              driver.get("https://www.google.com");
20              WebElement element1 = driver.findElement(By.name("q"));
21              element1.sendKeys("software testing help");
22              element1.sendKeys(Keys.ENTER);
23              String a = Keys.chord(Keys.CONTROL,Keys.RETURN);
24              driver.findElement(By.partialLinkText("Software Testing Help - A Must Visit Software Testing Portal")).sendKeys(a);
25              Robot robot = new Robot(); // instantiated robot class
26              robot.keyPress(KeyEvent.VK_CONTROL); // with robot class you can easily achieve anything if you know the shortcut keys
27              robot.keyPress(KeyEvent.VK_2); // here, we have just pressed ctrl+2
28              robot.keyRelease(KeyEvent.VK_CONTROL); // once we press and release ctrl+2, it will go to the second tab.
29              robot.keyRelease(KeyEvent.VK_2); //if you again want to go back to first tab press and release vk_1
30              }
31 }

Q #15) Write a Java Program to find the duplicate characters in a string.

Answer: In this program, we have created a string variable str and initialized an integer count with zero.

Then, we have created a character array to convert our string variable to the character. With the help of for loop, we are performing a comparison between different character at different indexes.

If two character of consecutive index matches, then it will print that character and the counter will be incremented by 1 after each iteration.

1 public class DuplicateCharacters {
3           public static void main(String[] args) {
4                    // TODO Auto-generated method stub
5                   String str = new String("Sakkett");
6                   int count = 0;
7                   char[] chars = str.toCharArray();
8                   System.out.println("Duplicate characters are:");
9                   for (int i=0; i<str.length();i++) {
10                               for(int j=i+1; j<str.length();j++) {
11                                          if (chars[i] == chars[j]) {
12                                                     System.out.println(chars[j]);
13                                                     count++;
14                                                     break;
15                                           }
16                                }
17                    }
18            }
20 }


Duplicate characters are:

Q #16) Write a Java Program to find the second highest number in an array.

Answer:  In this program, we have initialized an array with 10 random elements out of which we are going to
find the second highest number. Here, we have two integers- the largest and second largest. Both set to the first
index of the element. Then, we have printed all the elements using for loop.

Now the logic is when the element at the 0th index is greater than the largest, then assign arr[0] to largest
and secondLargest to largest. Again, if the element at the 0th index is greater than the secondLargest, then
assign secondLargest to arr[0].

This will be repeated for each iteration and ultimately after comparing or completing iterations up to array length will give you the secondLargest element.

1 public class SecondHighestNumberInArray {
2 public static void main(String[] args)
3     {
4         int arr[] = { 14464794945286369489 };
5         int largest = arr[0];
6         int secondLargest = arr[0];
7         System.out.println("The given array is:");
8         for (int i = 0; i < arr.length; i++)
9         {
10             System.out.print(arr[i] + "\t");
11         }
12         for (int i = 0; i < arr.length; i++)
13         {
14             if (arr[i] > largest)
15             {
16                 secondLargest = largest;
17                 largest = arr[i];
18             }
19             else if (arr[i] > secondLargest && arr[i] != largest)
20             {
21                 secondLargest = arr[i];
22             }
23         }
24         System.out.println("\nSecond largest number is:" + secondLargest);
25     }
26 }


The given array is:
14 46 47 45 92 52 48 36 66 85
Second largest number is:85

Q #17) Write a Java Program to check Armstrong number.

Answer:  First of all we need to understand what Armstrong Number is. Armstrong number is the number
which is the sum of the cubes of all its unit, tens and hundred digits for three digit number.

153 = 1*1*1 + 5*5*5 + 3*3*3 = 1 + 125 + 27 = 153

If you have a four digit number lets say

1634 = 1*1*1*1 + 6*6*6*6 + 3*3*3*3 + 4*4*4*4 = 1 + 1296 + 81 + 256 = 1634

Now, in this program, we have a temp and integers declared. We have initialized c with value 0. Then, we need to
assign the integer value which we are going to check for Armstrong (in our case, let us say 153). Then we have assigned our temp variable with that number which we are going to check.

Thereafter, we have used while conditional check where the remainder is assigned to a and the number is divided by 10 and assigned to n. Now, our c variable which was set to zero initially is assigned with c+(a*a*a). Suppose we have to evaluate a four-digit number then c should be assigned with c + (a*a*a*a).

Lastly, we have put an if-else statement for conditional checking where we have compared the value contained in c against temp(which has the actual number stored at this point). If it matches, then the number is Armstrong otherwise not.

1 class Armstrong{ 
2  public static void main(String[] args)  { 
3    int c=0,a,temp; 
4    int n=153;//It is the number to check Armstrong 
5    temp=n; 
6    while(n>0
8    a=n%10
9    n=n/10
10     c=c+(a*a*a); 
12     if(temp==c) 
13     System.out.println("armstrong number");  
14     else
15         System.out.println("Not armstrong number");  
17 }

armstrong number

Q #18) Write a Java Program to remove all white spaces from a string with using replace().

Answer:  This is a simple program where we have our string variable str1.

Another string variable str2 is initialized with the replaceAll option which is an inbuilt method to remove n number of whitespaces. Ultimately, we have printed str2 which has no whitespaces.

1 class RemoveWhiteSpaces
2 {
3     public static void main(String[] args)
4     {
5         String str1 = "Saket Saurav        is a QualityAna    list";
7         //1. Using replaceAll() Method
9         String str2 = str1.replaceAll("\\s""");
11         System.out.println(str2);
13            }
14 }
15 }



Q #19) Write a Java Program to remove all white spaces from a string without using replace().

Answer: This is another approach to removing all white spaces. Again, we have one string variable str1 with some
value. Then, we have converted that string into a character array using toCharArray().

Then, we have one StringBuffer object sb which will be used to append the value stored at chars[i] index after we have included for loop and one if condition.

If the condition is set such that then the element at i index of the character array should not be equal to space or tab. Finally, we have printed our StringBuffer object sb.

1 class RemoveWhiteSpaces
2 {
3     public static void main(String[] args)
4     {
5         String str1 = "Saket Saurav        is an Autom ation Engi ne      er";
7         char[] chars = str1.toCharArray();
9         StringBuffer sb = new StringBuffer();
11         for (int i = 0; i < chars.length; i++)
12         {
13             if( (chars[i] != ' ') && (chars[i] != '\t') )
14             {
15                 sb.append(chars[i]);
16             }
17         }
18         System.out.println(sb);           //Output : CoreJavajspservletsjdbcstrutshibernatespring
19     }
20 }



Q #20) Write a Java Program to read an excel.

Answer: These types of programs are generally used in Selenium framework. We have added detailed comments for every step to make the program more understandable.

The logic starts after we have loaded the sheet in which the data is stored. We are trying to import email and password. For this, we are retrieving the cell using getRow() and getCell() method. Let’s say we have email and passwords at the 1st and 2nd cell.

Then we are setting the type of cell to string. Thereafter we are carrying out a normal web element locator operation (By.id) where we have passed unique locator values such as “email” and “password” which will identify these elements.

Finally, we are sending keys using element.sendKeys where cell.getStringCellValue() is the key. This will return you the value stored at cell number 1 and 2 respectively.

1 @Test
2  public void ReadData() throws IOException
3  {
4      // Import excel sheet from a webdriver directory which is inside c drive.
5      //DataSource is the name of the excel
6      File src=new File("C:\\webdriver\\DataSource.xls");
8      //This step is for loading the file. We have used FileInputStream as
9      //we are reading the excel. In case you want to write into the file,
10      //you need to use FileOutputStream. The path of the file is passed as an argument to FileInputStream
11      FileInputStream finput = new FileInputStream(src);
13      //This step is to load the workbook of the excel which is done by global HSSFWorkbook in which we have
14      //passed finput as an argument.
15     workbook = new HSSFWorkbook(finput);
17      //This step is to load the sheet in which data is stored.
18      sheet= workbook.getSheetAt(0);
20      for(int i=1; i<=sheet.getLastRowNum(); i++)
21      {
22          // Import data for Email.
23          cell = sheet.getRow(i).getCell(1);
24          cell.setCellType(Cell.CELL_TYPE_STRING);
25          driver.findElement(By.id("email")).sendKeys(cell.getStringCellValue());
27          // Import data for the password.
28          cell = sheet.getRow(i).getCell(2);
29          cell.setCellType(Cell.CELL_TYPE_STRING);
30          driver.findElement(By.id("password")).sendKeys(cell.getStringCellValue());
32         }
33   }


In this article, we have discussed all the important basic Java Interview Programs with code examples that are being asked in any Java Programming Interviews.

We have learned all the Java Tricks like basic manipulation of String, Integer and Characters, Selenium Codes, Reading Data from a File, Mathematical Series through codes and now you do have ample idea of how to go about any Java Interview.

Good Luck 🙂


Recommended Reading

Spring Boot Microservices with JPA

Eclipse Tutorial For Beginners: Learn Java IDE in 10 Steps

Full Stack Development with Angular and Spring MVC

Easy to Advanced Data Structures

Java Programming for Complete Beginners in 250 Steps

Data Structures & Algorithms in Java

Crack Programming And Coding Interviews in 1st Attempt

Design Patterns – 24 That Matter – In Java

Learn Java Programming -Live Free,Learn To Code

JavaFX & Swing for Awesome Java UIs

Fundamentals of Java with NetBeans


Popular Java Frameworks Should learn in 2019

It is no surprise that Java is one of the most popular programming languages. In near future, there is a little chance for any other language to replace Java, not at least in 2019. The same goes for the Java Frameworks. Spring, JSF, and GWT are the top three frameworks that are mostly used by Java Developers. But this does not mean that other frameworks are not popular.

Since the selection of framework mostly depends upon the project type, it is important for the Java development companies and developers to analyze the project requirements and future needs carefully.

Frameworks Java 1

For example, Spark Framework is widely used by developers for creating lightweight web applications in Java 8 whereas Spring is used in building complex, enterprise-level Java applications, and microservices projects.

To ease out the selection process for you, here is a list of 7 incredible Java frameworks with the details of their pros and cons, along with what project type they are suitable for.

List of 7 Popular Java Frameworks for 2019

Although the list begins with the most popular one but is not an indicator of the best fit for your project. So, let’s begin without further ado.

1. Spring Framework

Any Java developer would vouch for its capability to create complex, high-performance web applications.

With simple components and configurations, this modular framework enables you to develop enterprise-level Java applications with much ease. Its DI-dependency injection feature and compatibility with other frameworks such as Kotlin and Groovy make it Java developers’ favorite.

Spring Framework utilizes inversion of control (IoC) design principle and so for developers, it is easier to focus a module on the task and free the modules from the assumptions and make programs extensible.

It has a number of modules to achieve different functionality in an application such as Spring core (Base module), Spring AOP (for cross-context logic), Spring Transaction (For transaction support), Spring MVC (Web aspect), and more.

Used For

  • Enterprise Java (JEE)
  • Web application development
  • Distributed application
  • Core features can be used for creating any Java applications
  • All layer implementations of a real-time application


  • All-inclusive programming and configuration model
  • Support traditional database RDBMS as well as new NoSQL
  • Provide backward compatibility and testability of code
  • Loose coupling can be achieved using IoC
  • Supports Aspect Oriented Programming and enables cohesive development
  • JBDC abstraction layer for exceptional hierarchy


  • Steep learning curve, most developers struggle with IoC and Dependency Injection
  • Configurations keep on changing so developers have to keep themselves updated with the latest change.
  • Although Dependency Injection is one of its strengths, it makes the project dependent on Spring framework

2. Grails

Grails is a dynamic framework, anchored by the Groovy JVM programming language. It works with Java technologies, including Java EE containers, Spring, SiteMesh, Quartz, and Hibernate.

This open source web development framework is widely popular among Java developers for Enterprise Java Beans or EJB support. Because of this, it does not need to configure the XML and so developers can quickly start the development process of creating a robust and scalable application.

Used for Building

  • Content management systems
  • e-Commerce sites
  • RESTful web services


  • Easy to use object mapping library
  • Simple GORM
  • A controller layer built on Spring Boot
  • Flexible profiles
  • Embedded Tomcat container for on the fly reloading
  • Advanced plugin system featuring hundreds of plugins
  • A responsive and supportive communit


  • Runtime language and so error-prone
  • Not the best choice for multi-threaded app
  • Need to purchase IntelliJ Idea, do not support any other IDE
  • Must learn Groovy language
  • Complex integration process

3. Blade

This 2015 born framework is so simple and lightweight that any developer from project’s perspective can understand it in a single day.

Based on Java 8, Blade, a lightweight MVC Framework provides a RESTful-style routing interface, making the web API cleaner and much easier to understand and synchronizing data with the website.

Used For

  • Full-stack web framework for creating web applications rapidly


  • Simple, small (smaller than 500KB) and clear coding structure
  • Multiple components to choose from
  • Multiple configuration files support
  • CSRF (Cross-Site Request Forgery) and XSS (Cross-site scripting) defense support
  • Support plug-in extensions and webjar resources
  • Embedded jetty server and template engine support


  • Complex dependency engine
  • Lack mobile-app richness
  • Heavy documentation

4. Google Web Toolkit

GWT is a completely free, open-source framework that enables the developers to write client-side Java code and deploy it as JavaScript. Many Google products have been written using GWT such as AdSense, AdWords, Google Wallet, and Blogger.

Using this framework, developers can easily write complex browser applications rapidly. GWT allows developers to develop and debug Ajax applications in the Java language.

During deployment, its cross-compilers translate the Java Applications to standalone JavaScript files. It comes with many features such as cross-browser portability, internationalization, bookmarking, and history and management.

Used For

  • Building progressive web apps
  • Creating and maintaining complex JavaScript front-end applications


  • Supports reusable approach for common web development tasks
  • Support for full-featured Java debugging
  • Developer-friendly RPC mechanism
  • HTML Canvas support provided
  • Google APIs can be used in GWT applications
  • Developers can design applications in a pure object-oriented manner


  • Java to JavaScript compilation is slow
  • Proprietary methods for defining the structure
  • Need to write more code even for simple things
  • Best suitable only for Java developers

5. JavaServer Faces (JSF)

JavaServer Faces makes web application development much easier leveraging on existing, standard UI and web-tier concepts. Developed by Oracle, it has a set of APIs for representing and managing UI components and custom tag library for expressing a JSF interface.

JSF is based on MVC software design pattern and has an architecture that clearly defines a distinction between application logic and representation.

Used For

  • Building native applications
  • Web applications
  • Enterprise applications


  • Create custom tags to a particular client device
  • Connect the presentation layer to the application code easily
  • Build user interfaces of reusable components
  • Use XML instead of Java for view handling


  • Incompatibility with standard Java technologies
  • Complex to perform simple tasks
  • Lack of flexibility
  • Minimum Ajax support
  • Steep learning curve

6. Play

Its popularity can be estimated by the fact that it is widely used by top companies such as Samsung, LinkedIn, Verizon, The Guardian, and more. Since it uses an asynchronous model that allows statelessness principle, play framework offers speed, performance, and scalability.

Built upon Akka Toolkit, Play framework abridge the creation of concurrent and distributed applications on the Java Virtual Machine. Its user interface is simple and intuitive and so developers can easily understand its basic features to begin the development project quickly.

Used For

  • Web applications that demand consistent content creation
  • Building Java and Scala applications for desktop and mobile interfaces


  • Hot reload for all Java code, configurations, and templates
  • Supports non-blocking I/O which is crucial for high-performance apps
  • Open source with a large community to contribute
  • Commercial support is also available
  • Compile and runtime error can be handled well


  • Steep learning curve, extensive documentation
  • Acts volatile sometimes

7. Struts

Here’s another enterprise-level framework maintained by Apache Software Foundation. This full-featured Java Web Application Framework allows the developers to create easy-to-maintain enterprise-level Java application.

One of the most noted features of Struts is its plugins which are basically JAR packages. Means they are portable and can be added in the classpath of the app.

For object-relational mapping, you can use the Hibernate plugin and for dependency injection, you can rely on the Spring plugin.

Used For

  • Enterprise application development


  • Well-organized JSP, Java, and Action classes that reduce development time
  • Centralized configuration, as most of the Struts values are represented in property files or XML
  • Custom JSP tags available to output the properties of JavaBeans components
  • In-built capabilities for checking form values


  • Single ActionServlet available, which causes scalability issues
  • Lack of backward flow
  • Less transparent
  • Non-XML compliance of JSP syntax


When it comes to Java frameworks, keep an open mind and research which one is best for you. There are so many frameworks that will suit your project but pick the one that requires less code to write your application and is easy to manage.

Latest Java Technologies Resources:

If you are not sure how to learn a new technology e.g. programming language, framework, or a library in 2019 then please see my post about ways to learn a new technology or programming language

Spring Boot Microservices with JPA

Eclipse Tutorial For Beginners: Learn Java IDE in 10 Steps

Full Stack Development with Angular and Spring MVC

Easy to Advanced Data Structures

Java Programming for Complete Beginners in 250 Steps

Data Structures & Algorithms in Java

Crack Programming And Coding Interviews in 1st Attempt

Design Patterns – 24 That Matter – In Java

Learn Java Programming -Live Free,Learn To Code

JavaFX & Swing for Awesome Java UIs

Fundamentals of Java with NetBeans

Thanks for reading this article so far. If you like these links then please share with your friends and colleagues on Facebook. If you have any questions or feedback then please drop a note.

These Skills can help to Boost Your Programming Languages Career in 2019

A couple of days ago, I was reading an interesting article on HackerNews, which argued that you should learn numerous programming languages even if you won’t immediately use them, and I have to say that I agree. Since each programming language is good for something specific but not so great for others, it makes sense to know more than one language so you can choose the right tool for the job.

These Skills can help to Boost Your Programming Languages Career in 20191

But which languages should you learn? Which languages will give you the biggest bang for your buck?

Even though Java is my favorite language, and I know a bit of C and C++, I am striving to expand beyond this this year. I am particularly interested in Python and JavaScript, but you might be interested in something else. This list of the top 10 programming languages — compiled with help from Stack Overflow’s annual developer survey as well as my own experience — should help give you some ideas.


Even though I have been using Java for years, there are still many things I have to learn. My goal for 2019 is to focus on recent Java changes on JDK 9, 10, 11, and 12. If yours is same, you’ll want to check out the Complete Java MasterClass from Simpliv. If you don’t mind learning from free resources, then you can also check out this list of free Java programming courses.


Whether you believe it or not, JavaScript is the number one language of the web. The rise of frameworks like jQuery, Angular, and React JS has made JavaScript even more popular. Since you just cannot stay away from the web, it’s better to learn JavaScript sooner than later.

It’s also the number one language for client-side validation, which really does make it work learning JavaScript.

Convinced? Then this JavaScript Masterclass is a good place to start. For cheaper alternatives, check out this list of free JavaScript courses.


Python has now toppled Java to become the most taught programming language in universities and academia.

It’s a very powerful language and great to generate scripts. You will find a python module for everything you can think of. For example,  I was looking for a command to listen to UDP traffic in Linux but couldn’t find anything. So, I wrote a Python script in 10 minutes to do the same.

If you want to learn Python, the Python Fundamentals from Pluralsight is the best online course to start with. You will need a Pluralsight membership to get access the course, which costs around $29 per month or $299 annually. You can also access it using their free trial.

And if you are looking for some free alternatives, you can find a list here.


If you are thinking seriously about Android App development, then Kotlin is the programming language to learn this year. It is definitely the next big thing happening in the Android world.

Even though Java is my preferred language, Kotlin has got native support, and many IDEs likeIntelliJ IDEA and Android Studio are supporting Kotlin for Android development.

The Complete Android Kotlin Developer Course is probably the best online course to start with.


This is another programming language you may want to learn this year. I know it’s not currently very popular and at the same time can be hard to learn, but I feel its usage is going to increase in 2019.

There are also not that many Go developers right now, so you really may want to go ahead and bite the bullet, especially if you want to create frameworks and things like that. If you can invest some time and become an expert in Go, you’re going to be in high demand.

Go: The Complete Developer’s Guide from Simpliv is the online course I am going to take to get started.


If you are thinking about GUI development for PC and Web, C# is a great option. It’s also the programming language for the .NET framework, not to mention used heavily in game development for both PC and consoles.

If you’re interested in any of the above areas, check out the Learn to Code by Making Games – Complete C# Unity Developer from Simpliv. I see more than 200K students have enrolled in this course, which speaks for its popularity.

And again, if you don’t mind learning from free courses, here is a list of some free C# programming courses for beginners.


If you are thinking about iOS development like making apps for iPhone and iPad, then you should seriously consider learning Swift in 2019.

It replaces Objective C as the preferred language to develop iOS apps. Since I am the Android guy, I have no goal with respect to Swift, but if you do, you can start with the iOS 11 and Swift 4 – The Complete iOS App Development Bootcamp.

If you don’t mind learning from free resources then you can also check out this list of  iOS courses for more choices. There’s also this nifty tutorial.


To be honest, I don’t know much about Rust since I’ve never used it, but it did take home the prize for ‘most loved programming language’ in the Stack Overflow developer survey, so there’s clearly something worth learning here.

There aren’t many free Rust courses out there, but Rust For Undergrads is a good one to start with.


If you thought that PHP is dead, then you are dead wrong. It’s still very much alive and kicking. Fifty percent of internet websites are built using PHP, and even though it’s not on my personal list of languages to learn this year, it’s still a great choice if you don’t already know it.

 Here is a great list of resources for learning the latest version, PHP 7.


Both C and C++ are evergreen languages, and many of you probably know them from school. But if you are doing some serious work in C++, I can guarantee you that your academic experience will not be enough. You need to join a comprehensive online course like C++: From Beginner to Expert to become industry ready.

And for my friends who want some free courses to learn C++, here is a list list of C++ Programming courses for beginners.

Even if you learn just one programming language apart from the one you use on daily basis, you will be in good shape for your career growth. The most important thing right now is to make your goal and do your best to stick with it. Happy learning!

Top Java Blogs and Books for Programmers of All Level

If you are a Java developer and looking for some awesome resources e.g. books and courses to improve your multi-threading and concurrency skills in Java then you have come to the right place. In the past, I have shared books and tutorials on Java Concurrency and Multithreading and in this article, I am going to talk about some of the best free and paid course to learn multi-threading and concurrency in Java. You can join these free courses to improve your understanding of Java Concurrency and Multithreading. It’s one of the most important skills for Java developers as almost all the companies who interviews Java developers pay particular attention to his knowledge and experience in this area.

If you are aiming for a job on big Investment banks like Citibank, Deutsche Bank or Barclays or in a service based companies like Infosys, TCS and Luxsoft and others, you must have a strong command on multithreading and concurrency concepts in Java.

Best Java Books

Following are the list of advance Java books, let’s discuss them one by one:

i. Head First Java

Head First Javaby Kathy Sierra & Bert Bates

Among all the java books, the best part of this book is its simplicity. Although, it has easily related java concepts in real life. Also, we can say that this book needs to be updated with all the recent changes. Although, this Java book is best for the understanding of the OOPS concepts.
For making the learning and memorizing tasks easier, this book contains mysterious problems, numerous puzzles, striking visuals, and particular soul-searching interviews for making the computer programming more playful and engaging. The book is a good choice for new programmers and those who want to improve their programming knowledge.

ii. Introduction to Programming Using Java, the 7th Edition

Introduction to Programming using JAVAby David J. Eck

Basically, this Java book is for beginner programmers. Although, good for experienced programmers also. But only for those who want to learn little about java. In the 7th edition, it also contains Java 8.
The book includes chapters, Programming in the Small I-Names and Things, Control, Subroutines,Objects and Classes, Introduction to GUI Programming, Arrays and ArrayLists, Correctness, Robustness, Efficiency, Linked Data Structures and Recursion, Generic Programming and Collection Classes, Advanced Input/Output: Streams, Files, and Networking and Threads and Multiprocessing Advanced GUI Programming.

iii. Java: The Legend

Java- The Legendby Ben Evans

As we know that Java has come a long way in the last 20 years. Also, Java is no more the fancy language of developers. Although, it has now become the mainstream of any development in the world. Moreover, the use of Java in Android has taken Java into an even more larger domain.
The book covers several topics like, How Java has provided benefits from early design decisions, including “Write Once, Run Anywhere” and an insistence on backward compatibility, the effect of open source, the great success and continued requirement of the Java Virtual Machine and platform, the rise of Enterprise Java and the launch of the Java developer community and ecosystem.

iv. Introduction to Programming Using Java, Sixth Edition

Introduction to Programming using Javaby David J. Eck

Basically, we can say this is the best book as compared to other Java books. As this book provides another free Java book. That contains in both PDF and HTML format. It teaches programming basics using Java programming language.
The sixth edition needs Java 5.0 and can also be utilized with later versions of java. Almost all the examples in the book will run with Java 5.0, but some characteristics from later versions of Java are also covered. You will detect many Java applets on the web pages that create this book, and most of those applets need Java 5.0 or higher to run.

v. Java – A Beginner’s Guide

Java A Beginners Guideby Herbert Schildt

This java book is best for beginners. It provides an introduction to Java language. Also, introduce java syntax. This is best for java programmers. Moreover, will help you to learn java from the beginning to the advanced level in an easy manner.
The author begins with the basic aspects, such as the process to create, compile, and function a Java program. He then covers the keywords, syntax, and constructs that create the core of the Java language. You will also learn some of Java’s more advanced features, like generics, multithreaded programming, and Swing.

vi. Object-Oriented vs. Functional Programming

Object Oriented Vs Functional Programmingby Richard Warburton

Generally, this java book helps to learn the differences between object-oriented and functional programming. As we can say Java 8 started supporting functional programming concepts. For Example – Lambda Expressions, Map, Flat map, Reduce etc
You will learn how lambdas create OOP languages better suitable for dealing with parallelism and concurrency, get to know the process of SOLID—OOP’s five basic principles of programming—map to functional languages and paradigms, find certain common OOP design patterns and how they remain in the functional world.

vii. Java 8 in Action: Lambdas, Streams, and functional-style programming

Java 8 in Actionby Mario Fusco & Alan Mycroft

Basically, this Java book contains new features of Java 8. One of the important things about this book. That we can write concise code in less time.
What’s Inside:

  • How to use Java 8’s powerful new java features.
  • Writing effective multicore-ready java applications.
  • Refactoring, testing, and also debugging of java.
  • Adopting functional-style programming in java.
  • Java Quizzes and quick-check questions.

viii. Java Cookbook: Solutions and Examples for Java Developers

Java Cookbookby Ian Darwin

Basically, this book includes:

  • Java methods for compiling, running, and debugging;
  • Manipulating, comparing, and rearranging text in java;
  • Java Regular expressions for string- and pattern-matching;
  • Handling numbers, dates, and times in Java;
  • Structuring data with collections, arrays, and other types in Java;
  • Java Object-oriented and functional programming techniques;
  • Java Directory and filesystem operations.
  • Working with graphics, audio, and video in Java

ix. Java: The Complete Reference (Ninth Edition)

Java The complete Referenceby Herbert Schildt 

If you want to become a master in Java, this book is the best. Although not so good for complete beginners, because it’s more than 1200 pages long. But this is the best if you want to learn beyond the basics.
The author describes the complete Java language, like its syntax, fundamental programming principles, keywords, and significant parts of the Java API library. Examining the JavaBeans, Swing, applets, servlets, and real-world examples show Java in action. It also includes New Java SE 8 features like the default interface method, the stream library, lambda expressions are discussed in detail. It also provides a basic introduction to JavaFX.

x. Core Java Volume I — Fundamentals (9th Edition)

Core Javaby Cay S. Horstmann & Gary Cornell

We can say this is the other best book to java. As it contains an explanation of the different features of Core Java. Although this book doesn’t cover Java 8, otherwise it’s one of the best java reference books.
The book is for advanced programmers. This reliable, unbiased book focuses on key Java language and library features with strong tested code examples. As in previous editions, all code is easily understandable, shows modern best practices, and is specifically created to help in the quick start of your projects. It quickly brings you with Java SE 7 core language enhancements, like the catching of multiple exceptions diamond operator, and improved resource handling.

xi. Effective Java 2nd Edition

Effective Javaby Joshua Bloch

This is not best for the beginners but must have a book for the Java programmers. Also, the book provides the best practices to follow for java algorithms. Although, you must have to read this book in parallel with another book. So as follow this practice right from the start.
Basically, these best practices are divided into 11 different sections. So, I would recommend you to read this book.

xii. Java SE8 for the Really Impatient

Java SE 8by Cay S. Horstmann

This book is completely different. As it is with a shorter page length and a simpler writing style. Basically, this book provides java SE8 along with new features.
Particularly, You’ll learn about concurrent programming techniques. Also, how to make these changes in the SE8 release(and later). Although, It’s very detailed books. Hence, not good for beginners.

xiii. Beginning Programming with Java For Dummies

Beginning Programming with Javaby Barry Burd

This is the best Java book if you have experience in coding. Also, best for the beginners. As this book was written in plain English.
As this book is currently in its 4th edition. That covers all the fundamentals of basic Java. Particularly in this book, you will learn everything step by step. That first learn how to install Java, how to run and compile the code.

xiv. Java Programming 24-Hour Trainer

Java programming 24 Hour trainerby Yakov Fain

This book for Java is reasonable for beginners. Also, the book was written in a Straightforward writing style. Although, best for the people who are new to java. As it encourages them to keep going and it builds confidence along the way.
The book will help you learn the building blocks that suits any Java project, ease the writing code through the Eclipse tools, understand to join Java applications to databases, create graphical user interfaces and web applications and learn to design GUIs with JavaFX.

xv. Java Performance: The Definitive Guide

Java Performance the definitive guideby Scott Oaks

Generally, this Java book describes the concepts of JVM along with APIs for testing. The best thing about this book is that it helps in learning you the best thing. As you will learn how to test your code the same way engineers and professional programmers do.
You will learn to implement four principles for gaining the best results from performance testing, utilize JDK tools to gather data on how a Java application performs, learn the advantages and disadvantages of utilizing a JIT compiler, adjust JVM garbage collectors to modify programs, a little bit.

xvi. Java Programming

Java Programmingby Wikibooks Contributors

Generally, this book is more expensive in Java. As this book is of 1,000 pages and it’s 9th edition. This book will force you to perform an exercise. Also, helps in learning various concepts with real life.
The book helps users learn the many ways one can run in Java. This book is both a useful reference and an introductory guide on Java and related technologies. The difficulty of the context increases, related to the lessons learned in the previous chapters. Freshers should, therefore, begin from the starting and move forward in a sequence for the whole material of the book.

xvii. TCP/IP Sockets in Java

TCP & IP Sockets in Javaby Kenneth L. Calvert & Michael J. Donahoo

As this book teaches you different TCP/IP connections. Also, you can work over a network with java. Further, this book will guide you sockets in java. Also, it’s everyday applications.
The book covers many new classes and capabilities shown in the last chapters of the Java platform. It helps the reader learn the tasks and techniques important to virtually all client-server projects through Java sockets.

xviii. Learn Java in One Day and Learn It Well

Learn Java in 1 dayby Jamie Chan

This is different from other books in a very good manner. As this is the short that covers a lot of ground. As this book contains only 230 pages but it covers all things from working to writing code.
The book has a unique project in the last part of the book that needs the application of all the concepts covered previously. Functioning through the project, will not only provide you a great sense of achievement but it will also facilitate the knowledge and expertise in language.

Here is my list of some of the best courses to learn Java online. I have always said that online courses are the best way to learn a new programming language, a new framework, a new library, or a new version of a popular technology e.g. Java.

Java Blogs
You can also use a book, in fact, I have been using books to learn from so long but in last a couple of years I have found online course great to start with. They are interactive and explains key concepts in quick time.

Once you found your feet, you can always use a book to learn the Java or any new technology in depth. If you have not read yet, then Effective Java 3rd Edition is a good book to read in 2019. It also covers JDK 9 and has a whole item on Modules and Modular JDK.

Java is packed with new features and in this article, I am going to share some of the best Java courses you can take to learn new features of Java quickly.

Adam Bien

Ever since the release of JDK 1.0 back in 1995, Adam Bien has been working continuously as a freelancer Java expert.

His blog posts are read daily by thousands of Java professionals, learners, and enthusiasts from around the world. You will find everything related to JavaFX and Java EE on the dedicated blog along with other useful Java information.

Most of the blog posts feature videos that make the learning process more straightforward and efficient. Also, several ebooks are also available at the web resource. Adam Bien regularly adds interactive web events and workshops on the blog, which are even better to learn and advance in Java.


Another essential web resource for Java programmers in Baeldung. The dedicated Java website is an excellent option for anyone looking to seek the latest Java news, updates, and professional advice. In addition to offering Java-focused articles from a diverse range of Java professionals and experts, Baeldung provides useful learning courses.

Baeldung focuses specifically on HTTPClient information, Jackson, Java, Persistence, and REST APIs. Typically, multiple high-quality articles are added to the website each day.

In addition to tutorials and guides for Java, there are several in-depth tutorials on Spring Framework.


JavaWorld, the name in itself is explanatory of what the website is all about. It is one of the leading resources for Java developers to stay updated about the programming language as well as related technologies. JavaWorld is a community for and by Java people.

JavaWorld offers information on open source Java projects, Java Q&As, and programming careers. It is an ideal place for newbies Java programmers to start. The Java 101 blog series is developed primarily for those new to the programming language. It covers topics such as APIs, packages, and syntax.

Seasoned Java experts can stay ahead in their game with regular updates about changes made to Java and in-depth information on various Java tools. JavaWorld is a great place to know about the opinions and viewpoints of industry leaders.

Java Revisited

Curated by Javin Paul, a Java professional with several years of industry experience, Java Revisited is another opportune blog to follow. It offers various excellent how-to and step-by-step Java guides. Therefore, it is a convenient learning option for both beginners and seasoned Java programmers.

In addition to Java, the blog also focuses on FIX protocol and Tibco RV.

One of the major highlights of the dedicated Java blog is the encouragement of readers to conduct interviews with Javin. Among all the queries asked, Javin collects some of the most relevant ones and converts them into detailed blog posts.


The jOOQ blog focuses on Java, SQL, and jOOQ. The massive stockpile of information at the blog primarily consists of how to articles and step-by-step guides. Owing to the versatility of the same, there is something worth learning for Java programmer of every skill level.

The frequency at which articles get published on the blog is infrequent. However, it isn’t an issue as there are already hordes of articles, to begin with. The sidebar allows users to easily navigate their way to some categories, including Java and Other Languages, Thoughts on Programming, and SQL Tricks and Tips.

Thoughts on Java

Operated by Thorben Janssen, Thoughts on Java is yet another Java blog for newbies, veterans, and everyone in between. Specializing in Hibernate, Janssen is a Java professional with over 15 years of industry experience. Two new blog posts are added to the dedicated Java blog every week. The blog posts cover everything ranging from Java news to in-depth guides.

In addition to the articles, one can also benefit from various online courses, workshops, and YouTube videos available at Thought on Java.

Moreover, Janssen also offers on-site and open classroom training. Signing up at Thoughts on Java unlocks cheat sheets, downloadable ebooks, and printable Hibernate tips.

Vlad Mihalcea

Vlad Mihalcea is one of the most famous Java experts and skilled professionals. He is a dedicated blogger and mentors with a reach of over 75k visitors a month. With a diverse range of articles available on this blog, there is something worth learning for Java developers of all levels. Recent articles at the blog aim at Hibernate.

In addition to the blog, Vlad Mihalcea is the author of the book High-Performance Java Persistence. The book entails a discussion about batch updates, connection management, fetch sizes, Java data access frameworks, and Java data access performance tuning. Amazingly, the content of the book is inspired from the very posts published on the blog.

To sum up, Vlad’s blog is a must-visit for every Java developer. In addition to the new articles published every week, the blog boasts on-site training, tutorials, and a video course.

Java and Programming Resources you may like

The resources mentioned above will ensure you stay relevant in the industry by continuously improving your Java skill set and knowledge base. And, if you need to learn something new, then you can always get your desired online course

Spring Boot Microservices with JPA

Eclipse Tutorial For Beginners: Learn Java IDE in 10 Steps

Full Stack Development with Angular and Spring MVC

Easy to Advanced Data Structures

Java Programming for Complete Beginners in 250 Steps

Data Structures & Algorithms in Java

Crack Programming And Coding Interviews in 1st Attempt

Design Patterns – 24 That Matter – In Java

Learn Java Programming -Live Free,Learn To Code

JavaFX & Swing for Awesome Java UIs

Fundamentals of Java with NetBeans