Learn Java and Programming through articles, code examples, and tutorials for developers of all levels.
Wednesday, April 26, 2023
React Native vs Flutter? Which is better to learn for App Development in 2024?
Angular vs React vs Vue.js ? Which is better to learn web development in 2024?
How to Find Lowest Common Ancestor of a Binary Tree in Java? Example Tutorial
Hello guys, if you are wondering how to find the lowest common ancestor of a binary tree in Java then you are at the right place. Earlier, I have shared 40+ binary tree questions and today I am going to share solution of one of the popular binary tree question here. To find the lowest common ancestor of a binary tree in java requires that we run through a binary search tree and how it operates. What then is a binary search tree? A Binary tree is a data structure in which each node can have at most two children. That is, each node in the binary tree will have data, left child and right child. The first node of the tree is called the Root.
8 Examples of Primitive Data Types In Java (int, long, boolean, float, double, byte, char, and short)
Hello guys, Data types are first few things you should learn when you start learning a programming language and when it comes to learn Java, there are 8 primitive data types which you should know. These are divided into three categories, numeric, text, and boolean values. Numeric data types can be further divided into two like natural numbers and floating pointing numbers. But, Before we get to a list of the 10 examples of primitive data types in Java, let me tell you a little bit more about what the primitive data types are. There are essentially 8 primitive data types in Java. They are int, byte, short, long, float, double, boolean, and char. The primitive data types are not considered objects and represent raw values. These primitive data types are also stored directly on the stack.
10 points on TCP/IP Protocol, Java Programmers should Know
Monday, April 24, 2023
What is try with resource in Java? Example tutorial
How to get the first and last item in an array in Java? Example Tutorial
Difference between array and Hashtable or HashMap in Java
A couple of days back someone asked me about the difference between an array and a hashtable, though this is a generic data structure and programming question, I'll answer it from both a general programming perspective as well on Java perspective where Hashtable is not just a data structure but also a class from Java Collection API. Even though both array and hashtable data structure are intended for fast search i.e. constant time search operation also known as O(1) search, the fundamental difference between them is that array require an index while hash table requires a key which could be another object.
How to replace Anonymous Class to Lambda Expression in Java 8? Example Tutorial
Hello guys, you may be thinking why I am talking about Anonymous class now when many Java programmers have already switched to Java 8 and many have already moved on from Anonymous class to Lambda expression in? Well, I am doing it because I am seeing many Java programmers who find it difficult to write and read code using lambda expression in new Java 8 way. It's also my own experience that if you know the problem first, you can better understand the solution (lambda expression). Some of you might remember, the opening scene of MI 2 (Mission Impossible 2), when Nekhorovich says to Dimitri that "Every search for a hero must begin with something that every hero requires, a villain. Therefore, in our search for a hero, Belairiform, we created the monster, Chimera".
Java FileReader + BufferedReader Example
10 Examples of print(), println() and prinf() methods In Java - PrintStream
Hello guys, if you are working in Java or just started with Java then you have must come across statements like System.out.println("Hello world") to print something on console or command prompt. This is actually the first statement I wrote in Java when I started programming and at that time I didn't realize how it work and what is System and PrintStream class and what is out here but now I know and I am going to explain all this to you in this article, along with PrintStream class and its various print methods like print(), println() and particularly printf() to print various objects in Java. But, Before we get to the 10 examples of Printstream printf() in Java, let me tell you a little bit more about what exactly Printstream is.
Chain of Responsibility Pattern in Java? Example Tutorial
Sunday, April 23, 2023
Top 10 Projects to Learn Front-End Web Development
How to use @JsonCreator and @JsonPropertOrder Jackson JN Annotation in Java? Examples
Top 5 Functional Interface Every Java Developer Should Learn
Hello guys, functional interface in Java are an important concept but not many developer pay enough attention to them. They learn lambda and method reference but the functional interface from java.util.function package. While its not really possible to learn all the functional interfaces on that package but you can learn a few more commonly used ones like Predicate, Supplier, Consumer etc and that's what you will learn in this article. But, before we get to the top 5 functional interfaces that every Java developer should learn, let me tell you a bit about what Java really is.
Difference between Class and Object in Java? Example
How to convert List Of of Object to Map of Object (key, value) In Java? Example Tutorial
What is WeakHashMap in Java? HashMap vs WeakHashMap Example Tutorial
Hello friends, we are here today again on our journey to Java. I hope everyone is fine and ready to board our train of knowledge. Today we are gonna learn something very interesting and very exciting. Today's topic will definitely be very useful in coding and programming. This topic would surely decrease your time complexity, and space requirements for any task very significantly :p So what's the wait? Let's start!
JDBC - Difference between PreparedStatement and Statement in Java? Answer
Can you make a class static in Java? Example
Difference between Fixed and Cached Thread pool in Java Executor Famework
Difference in Method Overloading, Overriding, Hiding, Shadowing and Obscuring in Java and Object-Oriented Programming?
Difference Between Iterator and Enumeration In Java
Saturday, April 22, 2023
Top 20 Docker Interview Questions Answers Java Developers and DevOps
Top 30 Gradle Interview Questions Answers for Experienced Java Developers
Top 24 Node.js Interview Questions with Answers for 1 to 2 Years Experienced Web Developers
Difference between Proxy and Decorator Pattern in Java
[Solved] How to find the Longest common prefix in Array of String in Java? Example Tutorial
How to check if a node exists in a binary tree or not in Java? Example Tutorial
10 Tools Every Software Engineer Should Learn In 2024
Hello guys, as a software engineer, staying up-to-date with the latest tools and technologies is essential to your success and one way to keep yourself up-to-date is to learn new framework, libraries and tools. Earlier, I have shared 5 Java Frameworks to learn in 2024 and in this article, we will introduce you to 10 tools that every software engineer should learn in 2024. The list includes, both essential and advanced tools from Git and Docker to TypeScript and GraphQL, which you will need in your day to day development, particularly on web development.
10 examples of crontab commands in Linux
Top 10 C++ Interview Questions with Answers for 1 to 2 years Experienced
Top 50 Microsoft Software Development Engineer Interview Questions
Hello guys, if you are preparing for Microsoft Software Development Engineer interview or in general preparing for FAANG coding interviews and looking for common interview questions for practice then you have come to the right place. Earlier, I have shared best Coding interview courses and books and in this article, I am going to share you some of the frequently asked questions from Microsoft. Most of the things depending upon for which position you are going like technical analyst, software engineer, Java developer, web developer or internship. If you have a computer science degree and if your job involves coding then you can expect following questions, which are mainly collected from engineers who has appeared on on and off campus interviews.
Friday, April 21, 2023
Difference between child and descendent selectors in jQuery in CSS?
Main difference between descendant and child selector in jQuery or CSS is that descendant selector selects all dom elements whether they are its direct children or not, on the other hand child selector only select direct childrens. Its very easy to understand if you know meaning of descendant and child. For example, my daughter is both my child and descendant but my granddaughter is not my child but descendant. Same definition work in both CSS and jQuery world Since jQUery got his selector from CSS itself, any difference between descendant and child selector which is valid for CSS is also valid for jQuery, unless otherwise stated. Now, lets understand this in terms of DOM elements
Top 12 Java NIO Interview Questions Answers for 5 to 10 Years Experienced Programmers
Top 30 Advanced Java Interview Questions for Experienced Developers
Hello guys, I have shared a lot of questions from Java Interviews in this article, so much so that many of my reader search Javarevisited for any Java interview question they come across. While In the past, I have shared Java concurrency questions, Java collections questions, Java questions on design patterns, and many tricky Java questions but a lot of people asked me to share more practical questions for experienced Java developers. Means, more advanced Java questions for 5 to 7 and even 10 years of experienced Java developers.
Top 20 DevOps Interview Questions with Answers for Experienced Developers
Top 20 PL/SQL Interview Questions with Answers
Top 21 Groovy Interview Questions with Answers for Java developers
Top 20 Apache Spark Interview Questions and Answers
Top 20 Oracle Database Interview Questions with Answers for 3 to 5 Years Experienced
Top 21 Python Interview Questions Answers for 1 to 2 Years Experienced Programmers
Top 21 Git Interview Questions and Answers for Programmers and DevOps
Top 18 CSS Interview Questions and Answers for 1 to 2 years experienced
Thursday, April 20, 2023
5 Difference between Iterator and ListIterator in Java?
HelloWorld Program in Java with Example
Difference between GenericServlet vs HttpServlet in Servlet JSP - J2EE question
How to iterate over HashSet in Java - loop or traverse Example
In our last Java collection tutorial, we have seen How to iterate over ArrayList in Java and in this tutorial we will see How to iterate over HashSet in Java. There are two ways to iterate, loop or traverse over HashSet in Java, first using advanced for-each loop added on Java 5 and second using Iterator which is a more conventional way of iterating over HashSet in Java. Now questions are When should you use for loop and when Iterator is an appropriate option. Well I usually use for loop If I only read from HashSet and doesn't remove any element, while Iterator is preferred approach. You should not remove elements from HashSet while iterating over it in for loop, Use Iterator to do that.
How to Fix java.lang.VerifyError: Expecting a stack map frame at branch target 14 in method at offset JDK 7 [Solved]
When to throw and catch Exception in Java? [Best Practice]
How to Fix java.sql.BatchUpdateException: Error converting data type float to numeric - Java + SQL Server
How to Fix SQLServerException: The index is out of range? JDBC Example
How to deal with java.lang.NullPointerExceptionin Java? Cause, Solution, and Tips to avoid NPE
How to solve java.sql.BatchUpdateException: String or binary data would be truncated in Java JDBC? [Solution]
How to deal with Unsupported major.minor version 55.0, 57,0, 60.0, 61.0 in Java + Eclipse + Linux [Solution]
How to Fix java.lang.NoClassDefFoundError: org/dom4j/DocumentException [Solution]
[Solved] Exception in thread "main" java.lang.IllegalStateException during Iterator.remove() in Java
Wednesday, April 19, 2023
What is Synchronized Keyword and Method in Java? Example
How to use DROP command to remove tables in Oracle, MySQL and SQL Server
[Solved] Caused by: java.sql.SQLSyntaxErrorException: ORA-01722: invalid number in Java and Oracle
10 Essential SQL Commands and Functions Every Developer should learn
How to convert String to Integer SQL and Database? MySQL, Oracle, SQL server and PostgreSQL Example
Hello guys, if you are wondering how to convert VARCHAR to String in SQL then you are at the right place. In this article, we will cover various techniques to convert String to Integer in all databases - MySQL, Oracle, SQL server and PostgreSQL. To perform tasks or correlations or change between information in a SQL Server data set, the SQL information kinds of those values should coordinate. At the point when the SQL information types are unique, they will go through a cycle called type-projecting. The transformation of SQL information types, in this cycle, can be implied or unequivocal.
What is Normalization in SQL? 1NF, 2nd NF, 3rd NF and BCNF Example Tutorial
What is temporary table in Database and SQL? Example Tutorial
Hello folks, if you have heard the term temporary table online or by your colleague in a call and wondering what is temporary table, what is the difference between a normal table and a temporary table, and when and how to use it then you have come to the right place. In this blog, we shall learn how to use a temporary table in SQL. But before we go into that we need an overview of SQL. What is SQL? SQL stands for Structured query language. it is a programming language used in communicating or relating to the relational database. And this programming language performs various forms of operation in the data. It was created in the 1970s, SQL is used by database administrators, and developers writing data integration scripts, etc.
How to use EXISTS and NOT EXISTS in SQL? Microsoft SQL Server Example
Hello guys, if you are wondering how to use the IF EXISTS and NOT EXISTS in SQL then you are at the right place. Earlier, I have shared how to use GROUP BY, WHERE, and HAVING clause and in this tutorial I will share how to use exists and not exists clause in SQL. The IF EXISTS and NOT EXISTS commands in T-SQL are covered in depth in this article. When comparing data sets using subqueries, it also illustrates why EXISTS should be preferred over IN and NOT EXISTS over NOT IN. If you don't know, EXISTS is a logical operator in SQL that is used to check if rows in a database exist. If the subquery produces one or more records, it returns TRUE. The NOT EXISTS operator in SQL is the polar opposite of the EXISTS operator, and it is fulfilled if the subquery returns no results.
Tuesday, April 18, 2023
Top 21 Web Development Interview Questions with Answers
Top 20 Cyber Security Interview Questions and Answers
Top 20 Cloud Computing Interview Questions and Answers
Hello guys, if you are preparing for Java developer interview or DevOps Engineer Interview, or a System admin, , knowledge of Cloud Computing is mandatory nowadays. It's even more important if you are interviewing for Cloud Engineer. Earlier, I have shared best Cloud Computing Courses and Books and today, I am going to share 20 Cloud Computing Questions for interviews. You can use these questions to revise essential Cloud Computing Concepts before interviews. If you are new to Cloud Computing space then these questions are also good to learn more about Cloud Computing by doing research.
Top 20 Project Management Interview Questions and Answers
Top 20 AWS Interview Questions Answers for Developers and DevOps Engineers
Top 51 JavaScript Interview Questions for 1 to 2 Years Experienced Developers
Top 50 Advanced Java Garbage Collection and Performance Interview Questions and Answers
Top 50 Database and SQL Interview Questions Answers for Programmers
Top 27 Spring Security Interview Questions Answers for Java Developers
Top 20 Jenkins and CI/CD Interview Questions Answers for Java Developers
Hello guys, if you are preparing for Java developer interview or DevOps Interview, one tool which you should know well is Jenkins, the king of Continuous Integration and Continuous build, and one of the most desirable skill companies look on experienced programmers now a days. Earlier, I have shared best free Jenkins courses for programmers to learn this useful tool as well as Interview questions on DevOps, Docker, and Kubernetes and in this article, I am going to share 20 frequently sked Jenkins and CI/CD Interview questions with answers for both beginners and experienced developers.
Top 20 Agile and Scrum Interview Questions and Answers for PM, Programmers and Testers
Monday, April 17, 2023
How to use Recursion in JavaScript? Example Tutorial
What is HashSet in Java? Example Tutorial
Hello guys, we meet again for our journey of learning Java. Today, we are gonna learn something very fruitful and easy. Hope you all are excited and ready. I would recommend you guys to go through the HashMap or TreeMap article which goes over hashing as this topic has some of its features. So, What's the wait? Let's start! Suppose you guys are given the task of storing car names (yes, I love cars :p). Now, how would you store it? If you guys have some questions, here are the requirements. The car names may increase over time. So, logically, an array is not what we are looking for.
What is Blocking Deque in Java? How and When to use BlockingDeque? Example Tutorial
How to find 2nd, 3rd or kth element from end in linked list in Java? Example [Solved]
10 Examples of an Array in Java
Top 40 Perl Interview Questions and Answers for Programmers
3 Examples of flatMap() of Stream in Java
Hello guys, if you are doing Java development then you must have come across the flatMap() method on Stream and Optional Class. The flatMap() method is extension of map() function as it does both flattening and mapping (or transformation) instead of just transformation done by map() method. I have explained the difference between map() and flatMap() earlier in detail, but just to revise, let's revisit it. If you have a list of String e.g. {"credit", "debit", "master", "visa"} then you can use the map() method to get a list of integer where each value is length of corresponding String e.g. list.stream().map(s -> s.length()) will produce {6, 5, 6, 4}. This is called transformation because you have transformed an stream of String to a Stream of integer.
Saturday, April 15, 2023
How to fix cannot determine embedded database driver class for database type NONE
Hello and welcome to the blog post. Today we are going to take a look at a frequently encountered problem in Spring Boot Application. If you are reading this, I'm going to assume that you saw the problem "Cannot determine embedded database driver class for database type NONE" while executing a Spring Boot application. We will understand, when this error appears. For this we will create a simple Spring Boot project as shown below. It demonstrates how I encountered the problem "Cannot determine embedded database driver class for database type NONE".