Home » Core Java

Core Java

SQL Subquery – Nested Query in SQL

1. Introduction In this article, we will look at many examples of how to use SQL subquery using MySQL RDBMS. 2. What is the SQL Subquery? A subquery is also called a Nested Query. A Subquery is a Select Query inside another query. Subqueries can be used inside other select, insert, update and delete commands. It can also be used ...

Read More »

How to Convert a String to Array in Java

In this example, we are going to learn how to convert a string into an array in Java. We are going to discuss three different methods to break a string into an array. Using substring() methodUsing toCharArray() methodUsing split() method 1. Using substring() method The string class provides substring() method to fetch part of a string. String class has two ...

Read More »

Java Deadlock Example

In this article, we are going to show a Deadlock example in Java. 1. Introduction In Java deadlock is defined as a scenario where two or more threads are blocked forever. A computer system normally has many active processes and threads. This is true even in systems that only have a single execution core, and thus only have one thread ...

Read More »

How to Fix the Identifier Expected Warning in Java

In this article, we’ll give you some pointers on how to fix the Identifier Expected Warning in Java. 1. Why does it appear? Identifier Expected is one of many different syntax error messages a Java compiler may produce. It occurs when the compiler reaches a point in your program where, based on the grammar of the Java language, an identifier ...

Read More »

SQL Commit and Rollback Example

1. Introduction In this article, we will look at the Commit and Rollback commands. SQL transactions use Commit and Rollback commands. We will see how to use the Commit and Rollback commands in MySQL RDBMS. 2. What is a Transaction in SQL? A Transaction in SQL is a single logical unit of work.Transactions can make multiple changes to the database ...

Read More »

SQL Intersect Example

1. Introduction In this article, we will look at the Intersect operation. SQL Set Theory contains the Intersect. Most of the RDBMS like Oracle, SQL Server, and PostgreSQL support the Intersect operator. However, MySQL does not. In this article, we will understand what the Intersect operator is and how to emulate it in MySQL. 2. What does Set Theory mean? ...

Read More »

SQL Except Example

1. Introduction In this article, we will look at the Except operation. The Except is an operator of SQL Set Theory. The Except operator was introduced in the Microsoft SQL Server. Oracle supports MINUS operator which is equivalent to Except. However, MySQL supports neither Minus nor except. In this article, we will understand what the Except operator is and how ...

Read More »

Java ClassLoader Example

In this article, we’re going to discuss different types of Java ClassLoader, how they work and some examples to build our own implementation. 1. Introduction A class loader is an object that is responsible for loading classes. The ClassLoader class is an abstract class that uses a delegation model to search for classes and resources. Furthermore, the ClassLoader is part of JRE ...

Read More »

SQL Order By Clause Example

1. Introduction In this article, we will look at the Order by Clause. The Order by Clause sorts records returned by Select Queries. It’s an optional clause and can sort records with single or multiple tables. 2. Order by Clause in Relational Algebra Relational Algebra considers relations assets(auto-sorted). Hence, there is no concept of sorting or ordering there. However, SQL ...

Read More »

Java Decompiler Example

In this article, we are going to explain what a Java Decompiler is using examples. 1. What is a Java Decompiler? As the name suggests, a decompiler is the opposite of a compiler. A Java compiler reads .java source files and transforms them into .class files; a Java decompiler reads .class files as input and produces equivalent Java source code ...

Read More »