HTML

50+ Basic Core Java Interview Questions with Hints and Answers

If you are preparing for your next Core Java interview and looking for some common question to practice or check your knowledge, then you have come to the right place. In this article, I'll share 50 Core Java Interview Questions from various companies. I have already discussed the answers to these questions in this blog or Javarevisited, so I have just put the link. First, you should try to answer it yourself, and if you cannot then go to the link and find the answer. You can also compare your answer with mine and learn a few things here and there.

Top 10 Algorithms books Every Programmer Should Read

Algorithms are language agnostic, and any programmer worth their salt should be able to convert them to code in their programming language of choice. Unfortunately, I have come across several programmers who are REALLY good at programming languages like Java or Python, like knows minor details of API and language intricacies but have very poor knowledge of the fundamentals of Algorithms and Data Structure. Just ask them to implement any popular sorting algorithms like quicksort or merge sort, and they will fall apart. If you expect them to know more advanced and sophisticated algorithms like String processing algorithms, graph algorithms, tree traversal, or greedy algorithms, be ready to check on Interviews; otherwise, you might end up with some surprises.

Top 5 Free & Paid Spring Certification Courses and Practice Tests

Many Java developers don't know that, similar to Oracle's Java certification, there is also a Spring certification program, which certifies yourself for your Spring framework skill. There are three Spring certifications currently available, the Spring Professional certification exam, also known as the Vmware Certified Spring Professional exam (VMware EDU-1202) which certifies on your general knowledge about Spring framework, Spring MVC skill, Spring Boot, Spring Data JPA, Testing with Spring and Spring Boot, and other advanced Spring skills. Earlier, SpringSource provides these certifications, but now they are provided by Vmware, the company behind the Spring framework.

10 Spring Framework Annotations Every Java Developer Should Learn

Hello guys, if you are learning the Spring framework and want to know what are essential Spring annotations you should know then you have come to the right place. Earlier, I have shared the free Core Spring and Spring Boot courses for Java developers, and in this article, you will find some of the most common annotations in this article, which is a must for a Java developer to work with Spring. You will also learn what does annotation really does and why should you learn them. There is no doubt that the Spring framework is one of the most popular Java frameworks, and it has made the life of Java developers easy by providing some excellent features in the last 15 years. 

Top 21 Frequently Asked Java Interview Questions Answers

If you have been to a couple of Java interviews then you know that there are some questions that keep repeating like the difference between == and equals() method and may of its popular cousins like HashMap vs Hashtable, ArrayList vs LinkedList, the difference between equals() and hashCode(), or difference between Comparator and Comparable in Java. I call them frequently asked Java interview questions, and I suggest every Java developer make a list of them for their own reference and revision. I am sure many Java programmer already has such list of questions handy if you don't have then this is a good time to find and make your own list, or if you are in rush then you can also buy my book Grokking the Java Interview, which contains many such questions. 

12 Must Read Advance Java Books for Intermediate Programmers - Part 1

I often receive loads of email about Java books and courses recommendations, something like, I have 2 years of experience in Java and Spring, which Java books should I read to become an expert Java programmer, or I have 5 years of experience in core Java and want to become a Java expert, which books or courses should I refer? These are just some of the examples, but most of the requests are like that. It's interesting that most of the email I receive is not from beginners, I mean those who want to learn Java from scratch, but, from Java developers who have 2 to 3 years of experience. I call them Intermediate Java programmers because they are in the state of their career where they know how to program in Java, but they are not experts yet.

How to send an email with body and attachment from Linux

One of the common tasks for programmers working in a Linux machine is to send emails, for example, your Java applications are running on Linux like RHEL 5 or RHEL 6 version and you need to send a report of all the clients connecting to your application. An easy way to accomplish this is to write a shell script, which will dump all clients in the log file and then use the grep command and generate a report. If you have to grep logs from multiple hosts, you can also use the SSH command to run the same command on multiple hosts. Once you have got the list of clients connecting to your application, you can just send the CSV file to yourself in an email or to your application DL, or a group of users you want to.

Top 15 Spring Data JPA Interview Questions with Answers

Hello guys, If you are preparing for a Spring developer interview and looking for some Spring Data JPA Interview questions then you have come to the right place. Earlier, I have shared frequently asked interview questions on Spring Boot, Spring Cloud, and Spring MVC in general, and in this article, I will share frequently asked Spring Data JPA Interview Questions with Answers for Java developers. Spring is one of the most popular and widely used frameworks. Spring Data JPA is an important part of the framework as it makes working with JPA or any JPA implementation like Hibernate easier.  

Top 5 Books to learn React.js for Beginners in 2021

So, you are ready for the latest craze in coding today. Everyone is talking about this new React JavaScript coding language and you want to be a part of the React community. You are in the right place and now you are thinking about a great book to get you moving on learning the React approach to building components from the React JavaScript library. You know that your commitment is real because you are not intimidated by a technical book that averages 750 pages! Or, maybe you are brand new and are not even sure where to start your training in React JavaScript coding. It does not matter; today's top five book selections will take you from beginner to intermediate to advanced topics in React development.

How to find symbolic link or soft link in Linux - ls + find command example

There are two ways you can find a symbolic link or soft link in UNIX based operating system like Linux, Solaris, BSD, or IBM AIX. The first way is by using the ls command in UNIX which displays files, directories, and links in any directory and the other way is by using UNIX find command which has the ability to search any kind of files e.g. file, directory, or link. In this UNIX command tutorial, we will see examples of both of these UNIX commands for finding a soft link in any directory. If you are new to UNIX operating system and not familiar with the concept of the soft link and hard link, I would recommend getting a good hand on it, as it is one of the most powerful features of UNIX based system.

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

Hello guys, recently, I asked my followers on Twitter which Java version they are using in production, and most of them said Java 8 and Java 11. This is not surprising at all because many of the projects I have worked on also using Java 8 in production. After close to 7 years of Java 8 release, it is still the most used Java version in production which is not surprising though. Even though we now have Java 15 many programmers are yet to learn Java 8 and I often receive queries like which books to read or which online courses to join to learn essential Java 8 features like lambda expression, stream, and functional programming. 

Top 17 Linux, SQL, and Multicasting Questions from Java Interviews

Hello guys, If you have worked as a software developer or Java programmer then you know that SQL, Linux, and Networking fundamentals are essential skills for any Java developer, especially for server-side Java programmers. It actually doesn't matter whether you are applying for the job as a Java developer or C++ developer, Python developer or Ruby programmer, SQL and UNIX always have some role to play in your career. It's even essential for people who have less to do with programming like application support guys, business analysts, project managers, and subject matter experts.  Hence, it's imperative for any programmer or IT professional to prepare both SQL and UNIX well before going for any job interview.

Difference between View and Materialized View in Database or SQL?

The difference between View and Materialized view is one of the popular SQL interview questions, much like truncate vs delete, correlated vs noncorrelated subquery, or primary key vs unique key. This is one of the classic questions which keeps appearing in SQL interview now and then and you simply can’t afford to learn about them. Doesn’t matter if you are a programmer, developer, or DBA, these SQL questions are common to all. Views are a concept which not every programmer familiar with, it simply not in the category of CRUD operation or database transactions or SELECT query, its little-advanced concept for the average programmer.

Top 100 Data Structure and Algorithm Interview Questions for Java Programmers

Data structure and algorithms are a core part of any Programming job interview. It doesn't matter whether you are a C++ developer, a Java developer, or a Web developer working in JavaScript, Angular, React, or Query. As a computer science graduate, it's expected from a program to have strong knowledge of both basic data structures, like the array, linked list, binary tree, hash table, stack, queue, and advanced data structures like the binary heap, trie, self-balanced tree, circular buffer, etc. I have taken a lot of Java interviews for both junior and senior positions in the past, and I have also been involved in interviewing C++ developers. One difference that I have clearly noticed between a C++ and a Java developer is their understanding and command of Data structure and algorithms.

Top 20 System and Software Design Interview Questions for Java Programmers

System design questions are an important part of programming job interviews and if you want to do well, you must prepare this topic. In the past, when I shared my list of programming interview questions, I have shared a couple of System design questions but my readers kept asking me for more questions, as it is a hard topic to master and more and more practice is needed. I had my own list of questions that I have collected from various interviews with friends and colleagues but I needed more questions for this article and my own preparation then I stumbled upon the Grokking System Design Interview course. It's an excellent resource because it not only gives you a lot of System design question but also provide all the knowledge and tools you need to solve those questions.

Top 10 Programming Books for Coders of All levels - Must Read

Coding is one of the most essential skills for programmers, and if you want to survive as a programmer, you must improve your coding ability. Gone are the days when you can get a software development job without having you write a single line of code and then somehow survives in the role by doing support, coordination, and other non-coding activities. Companies, both big and small, are increasingly testing the coding skills of candidates before hiring. It's widespread for programmers to pass a coding test before a telephonic round of interview. 

Difference between UNION vs UNION ALL in SQL?

Hello guys, what is the difference between UNION vs UNION ALL is one of the most popular SQL interview questions and often asked programmer during telephonic round of interview. Though both UNION and UNION ALL is used to combine results of two SELECT queries, the main difference between them is that UNION doesn't include duplicate record but UNION ALL does. Another difference between them is that UNION ALL is faster than UNION but may look slow because it returns more data which takes more time to travel via the network. The difference between UNION and UNION ALL can be a tricky SQL question, especially for developers, who have not used this useful keyword ever. 

Top 5 Books to Learn Angular for Beginners - Best of Lot

Hello guys, if you have ventured into the Modern frontend development world then you may have heard about the Angular framework, one of the leading JavaScript frameworks for web development using Model view Design Pattern. The first version of Angular to be ever built was AngularJs, which was developed by Google. It is an open-source platform that is powered by JavaScript for developing mobile and web apps and was first released in 2010 by Google. It was aimed at making web design and development easier for programmers. 

Top 50 Microsoft SQL Server Telephonic Interview Questions with Answers

Hello guys, if you are preparing for an SQL Server Interview or a Java developer position where SQL Server skills are required and looking for SQL server interview questions then you have come to the right place. In the past, I have shared 10 SQL query Interview questions and today, I am going to share some SQL Server conceptual and theory questions which are very popular in interviews. The list not only includes SQL server specific questions like isnull vs coalesce but also many general SQL and database design concepts like referential integrity, joins, normalization, window functions, etc. 

Top 10 OCAJP and OCPJP Exam Simulators and Practice Test for Java Certifications

There is no doubt that exam simulators play an essential role in preparing for any Java certification like OCAJP, OCPJP, OCEJWCD, OCMJEA exams. In fact, they are one of the most crucial pillars because choosing a good exam simulator with a good book is generally the success mantra of many Java certification aspirants. The exam simulators prepare you well for exams by presenting the level of questions you can expect in real exams. They provide the much-needed practice in the exam like environment to increase your speed and accuracy required to pass a time-bound exam like OCAJP and OCPJP. It also helps you to find out your strong and weak areas well before the exam, so that you can focus more on weak areas.

Top 15 Spring Cloud Interview Questions and Answers for Java/JEE Programmers

Hello guys, If you are preparing for Java and Spring Boot Interview and looking for some Spring Cloud interview questions then you have come to the right place. Earlier, I have shared 15 Spring Boot Interview questions and today, I am going to share 15 Spring cloud interview questions for Java developers. These questions are good to revise essential Spring cloud concepts before interviews. Today is the world of cloud computing and most of the new Java development is happening on Cloud like AWS, GCP, and Azure. That's why it's very important for Java developers to learn about cloud and frameworks and libraries which support cloud-native development in Java, like Spring Cloud from Spring project.

Top 35 Java String Interview Questions with Answers

The  String class and concept is a very important class in Java. There is not a single Java program out there which is not using String objects and that's why it's very important from the interview point of view as well. In this article, I am going to share 35 String-based questions from different Java interviews. It includes questions on java.lang.String class as well as a string as data structure like. some coding questions something like I have shared in my earlier article about 75 Coding questions to Crack any Programming Job interviews

Top 15 Enum Interview Questions with Answers for Java Developers

Enum was introduced in Java 5 and since then it's been very popular among Java developers and widely used in different Java applications. Since Enum in Java is much more versatile than Enum in C or C++, it also presents lots of interesting use cases, a couple of them, we have seen in my article 10 ways to use Enum in Java. But, despite being so popular, many Java programmers are still not aware of the functionality provided by Enum and the subtle details of using Enum in Java code. I realized this fact when a couple of my readers asked me some of the questions like Can Enum implement an interface in Java or Why we can not create Enum instances outside of Enum, stating that these have been asked to them in there Java Interviews.

Top 21 String Programming and Coding Interview Questions With Solutions

In this article, I am going to share 21 of the most common String-based Programming and Coding interview questions from Java developer interviews. These questions require you to write code to solve the problem and they are different from traditional Java String questions like how the substring method works in Java or when to use the intern() method of String in Java? Since coding and problem solving are an important part of any programming job interview, it's imperative that you know how to solve them in time and in a pressure situation, which comes only after doing practice with the right set of questions. Since these questions are already tried and tested and appeared in many interviews, they will provide you the experience you need to crack your coding interview.

13 Free Java 8 Certification Sample Questions - OCAJP8 and OCPJP8 - 1Z0-808 and 1Z0-809 dumps

Hello guys, Java SE 11 certifications are already out but not many people are not going for it because of the difficulty level. If you want to become a certified Java developer then Java SE 8 is still the best possible option. If you are preparing for Oracle Java SE 8 Certifications, like OCAJP8 and OCJP8, also known as exam 1Z0-808 and 1Z0-809, and looking for some free practice tests, then you have come to the right place. Earlier, I have shared the best Java certification courses, and in this article, I am going to share some of the best OCAJP 8 and OCPJP 8 mock tests available for free of cost online, so that you can check your speed and accuracy before the real exam. 

Top 12 Servlet JSP Interview Questions for Java JEE Developers

Hello guys, Servlets and JSP Interview Questions are the core of any Java JEE Interview. It's expected from candidate to have good knowledge of Servlet, JSP, EJB, Struts, or Spring in any JEE interview. Consequently Servlets and JSP Interview Questions are very common in any JEE Interviews along with some questions from core Java, Some interview Questions from Spring and Some EJB interview questions. Since J2EE is the main platform for building enterprise and web application using Java programming language, it's important to prepare well for Java web developer interview, especially If you are in application development space. 

Top 10 Java Interview Questions for 2 to 3 years experience - Answered

Java Interview Questions 2 to 4 years of experience
If you are a Java programmer with 2 to 3 years experience of working in Java and looking for a job change then its better to know what is expected from a 2 to 3 years experienced Java programmer in a typical core Java or J2EE interview. Since 2 to 3 years is not a vast experience and you still fall under beginner to the intermediate category, it's not expected from you to have done profiling, Garbage collection tuning, or designing complex Java applications or even creating concurrent Java design pattern

How to Implement Double Checked Locking in Java? Example Tutorial

Double checked locking pattern is one of the interesting topics in Java Interviews. Earlier, it was asked to see if a Java developer can write code using a synchronized block or not, and now it asks to gauge the candidate's understanding of concurrency, volatile, and synchronization in Java. One of the simplest ways to write thread-safe Singleton was to make the getInstance() method synchronized but prior to JDK 1.6, a simple uncontented synchronization block was expensive, and that lead many developers to write the getInstance() method of Singleton class using double-checked locking idiom

OCMJEA 6 FAQs - Oracle Certified Master - Java EE 6 Enterprise Architect (1Z0-807, 1Z0-865 and 1Z0-866) - Frequently asked Questions

The OCMJEA (Oracle Certified Master Java EE Enterprise Architect) is one of the toughest Java certifications to crack, even for experienced Java developers. It requires architectural decision skills for the given business problem. Step 1 multiple-choice tests your skills by scenario-based business problems to choose the best design solution. The exam not only covers the Java EE platform but it also tests your security, hardware architecture, and design pattern skills.

Top 10 Free Python Programming Books - Download PDF or Read Online

Every Programmer loves free eBook and free courses, even more, if it comes from renowned technical book publishers like Oreilly and Manning. In the last article, I have shared some of the best free Java programming books, and today I am going to share some of the equally best free Python Programming books. These books are not illegal copies that are uploaded into the internet, but they are legal books, made free by their authors and publishers, much like free Udemy courses, which their instructor made free for educational and promotional reasons. Though these are not full-fledged books but concise eBooks, they are very informative and comprehensive enough to learn things like Data Science and Functional programming in Python.

How to use Strategy Design Pattern in Java with Example

Hello guys, you might have heard about, Can you tell me any design pattern which you have used recently in your project, except Singleton? This is one of the popular questions from various Java interviews in recent years. I think this actually motivated many Java programmers to explore more design patterns and actually look at the original 23 patterns introduced by GOF. Strategy pattern is one of the useful patterns you can mention while answering such a question. It's very popular, and there are lots of real-world scenarios where the Strategy pattern is very handy. 

5 Difference between Interface and Abstract class in Java?

What is abstract class and interface in Java?
The difference between abstract class and interface in Java is one of the tricky Java interview questions and mostly appear in core Java interviews. It has become now even trickier after Java 8 introduced default methods and allowed interfaces to have both default and static methods. Even though both interface and abstract class is a way to achieve abstraction in Java, there are significant differences between them, which you will learn in this article. Some time interviewer also not just focus on key differences between abstract class and interface in Java but he is also interested in some practical experience e.g. when to use interface in Java and when to use an abstract class in Java.

Top 5 Books to Learn Python for Coding in 2021 - Best of All

Python is one of the most popular programming languages, and there is a vast demand for Programmers who knows Python, and the best part is its increasing every year. If you want to learn Python in 2021 then you have come to the right place because earlier I have shared some of the free courses to learn Python and today I am going to share some of the best books to learn Python in 2021. Even though I am a Java Programmer, I am learning Python. In the real world, you often find that a big project in a bank or insurance domain leveraging several technologies together, like Java, C++, Python, UNIX, SQL, and several others.

Top 5 New Java Features to Learn in 2021

Hello guys, Java is changing rapidly. Now there is a new release every six months and it's hard to keep up-to-speed with new Java features. So what should a Java programmer do to keep himself up-to-date and without missing on key features? Well, instead of learning all-new feature you can focus on some of the key Java features which make development easier and has a potential to improve code quality. I haven't got a chance to learn most of the Java features since Java 10, so I decided to sit down and take note of the most important Java features and that's what I am going to share in this article. 

10 Tools Java Developers Should Learn in 2021 - (UPDATED)

We are in the first week of 2021, and many programmers have already started making a good process to their goals for 2021, which is very good, but if you are someone, who is still not sure what to learn in 2021, then you have come to the right place. In the past, I have shared 10 things Java developers to learn in 2021, and last week, I published the top 5 Java Frameworks to learn, but there is one topic that kept coming from my readers.  The question which I have received this week a couple of times from my fellow Java developers and readers is which tools Java programmers should learn in 2021? Or what are some excellent Java tools used in application development? And finally, what should I learn in 2021?

Top 5 Books to Improve Coding and Programming Skills - Must Read, Best of Lot

Learning a Programming language, like Java, Python, or C++ is easy, but learning to write good code is not. Writing good code is more Art than Science and also an important differentiating factor between an average programmer vs. a good programmer. Since most of the programmers often look for inspiration and resources to improve their coding skill, I decided to share some of the good books which can help them to improve their coding.  Since many universities, colleges, and training courses only teach programming languages but not the art of coding, it still remains one of the self-learned skills which many programmers acquired either in Job or working on real-world projects.

Difference between Abstraction and Encapsulation in Java and Object Oriented Programming

The difference between Abstraction and Encapsulation in Java is a common question in Java interviews for Beginners to check their understanding of Object-Oriented Programming and their ability to use them. Abstraction and Encapsulation in Java are two important Object-oriented programming concepts and they are completely different from each other. The only similarity between Abstraction and Encapsulation is that they are OOP concepts, other than that they mean two different things, but there is a confusing thing, both hide details to simplify things but for different reasons. 

6 Essential Data Structures Java Programmer should Learn in 2021

Hello guys, Data Structure is a building block of programs. It's even said that  "Data Structure + Algorithms= Program". That's why a good knowledge of data structure is very important for any programmers, including Java developers. Data structure gives you the option to store your data so that you can access it based on your requirement. For example, if you want a fast search based upon the username then you can use HashMap, but that's only possible if you know data structure and their implementations in the programming language you are using, and that's what you will learn in this article. 

Difference between Method and Constructor in Java and OOP?

What is the difference between method and constructor in Java is a very common question on beginner level Java interviews with 2 to 3-year experience. Since the constructor is kind of special and it has its own properties that separate it from any normal Java method, this question makes sense. The main difference between a Constructor and Method is that you need to call the method explicitly but the constructor is called implicitly by Java programming language during object instantiation. This is one of the special properties of constructors in Java and that's why all the object initialization code is put inside the constructor. 

Top 10 Frequently asked SQL Query Interview Questions

In this article, I am giving some examples of SQL queries which is frequently asked when you go for a programming interview, having one or two year experience in this field. Whether you go for a Java developer position, QA, BA, supports professional, project manager, or any other technical position, may interviewer expect you to answer basic questions from Database and SQL. It's also obvious that if you are working for one or two years on any project there is a good chance that you come across to handle databases, writing SQL queries to insert, update, delete and select records. 

Can You Override Static Method in Java? Method Hiding

Can we override the static method in Java
This is one of the most popular Java interview questions. The answer to this question is No, you cannot override the static method in Java because the method overriding is based upon dynamic binding at runtime and static methods are bonded using static binding at compile time. This means static methods are resolved even before objects are created, that's why it's not possible to override static methods in Java. Though you can declare a method with the same name and method signature in the subclass which does look like you can override static methods in Java but in reality that is method hiding. 

Top 21 Websites to Learn Coding for FREE in 2021 - Best of Lot

Hello folks, if you want to learn coding from scratch and looking for some free online training websites or you are someone who is learning programming and coding by yourself and looking for some awesome free websites and coding platforms, then you have come to the right place. Earlier, I have shared free courses to learn Java, Python, and JavaScript and In this article, I am going to share 21 websites to learn Coding for FREE. These are absolutely free online training websites and platforms you can use to learn programming languages and key software skills like web development,  machine learning, automation, and app development for free from the comfort of your office and home.

What is Method Overloading in Java? An Example

What is method overloading in Java?
Method overloading in Java is an object-oriented programming concept that allows a programmer to declare two methods of the same name but with different method signatures, like change in the argument list or change in the type of argument. Method overloading is a powerful Java programming technique to declare a method that does a similar job but with a different kind of input. One of the most popular examples of method overloading is the System.out.println() method whose job is to print data on the console. This method is overloaded to accept all kinds of data types in Java. 

Book Review Effective Java 3rd Edition by Joshua Bloch – A Must Read Book for Java Developers

Hello guys, you might have heard about Effective Java, one of the most recommended books for Java programmers. This is one of those books which every Java developer wants to read because it will not teach you syntax but how and when to use a particular feature. After the huge success of Effective Java 1st Edition and 2nd Edition, the 3rd edition of Effective Java released a couple of years ago.  After 10 years of long wait by Java programmers from all over the world, finally, an updated version of, probably, the most popular Java book on the planet is released and I am going to talk about this new version of Effective Java, I mean Effective Java 3rd Edition in this article and share my thought that why its a must-read book for every Java developer around the world.

Why Every Software Developers should Learn Docker in 2021

Hello guys, I have been asking my readers to learn Docker since last year. Why have I been doing this? Because Docker is not just another tool, it's a game-changer, and I firmly believe that every Programmer, be it a Java developer, a C++ developer, or a Web Developer coding in JavaScript, all should learn Docker. The first and foremost reason is that Docker simplifies both the development and Deployment of Software projects, for example, you can deploy a Java Microservice in the same way as a node application once you wrap them in a container. Just like Maven made it easy to maintain project dependencies, Docker takes it to another level by building applications and shipping them into containers.

Top 10 Websites for Coding Interview Preparation in 2021 - Best of Lot

If you are a fresher or final year graduate preparing for your placement interview, or a Java developer preparing for your next job and looking for some websites, blogs, and forums for programming interview questions then you have come to the right place. In this article, I am going to share some of the really good websites and resources that will help you to prepare and do well in programming interviews. Though there are a large number of good books with lots of programming questions like Cracking the Coding Interview and Programming interview exposed, they are not the most interactive or comprehensive resources.

Top 10 Google Cloud Certifications You can Aim in 2021

Hello guys, If you are aiming for Cloud Certifications in 2021 then Google Cloud Platform is one of the most in-demand platforms to go for. It's backed by Google and there is a huge demand for people who know Google Cloud Platform or have some experience in using Google Cloud Platform for DevOps, Machine Learning, and Big Data. Getting certified is a good way to learn both essential skills and get recognition and that's why I am sharing the 10 best Google Cloud computing certifications you can aim for in 2021.