Java Enum Example

Introduction Java Enums are used to define constants. Rather than declaring common categories of constants as individual strings, we can categorize and declare them as Enums. In this article, we will discuss how to declare Enums, use Java Enum in a for loop and Java switch case, and how Java Enums can be used in if/else statements. Some… Read More »

Java JDBC Insert Example

Introduction Web applications collect data from the user through the User Interface (UI) and insert the information into the database. This process happens automatically without us running any database scripts or monitoring data. This magic is done by JDBC (Java DataBase Connectivity), which is a Java API to connect Java code to any database. What is JDBC (Prepared)Statement… Read More »

Java String to Int

Introduction In Java, a lot of data is stored as objects rather than primitives. A string is an object, whereas int is a primitive data type. The advantage of objects is the ease of manipulation and storage. If we need any calculations to be performed, it is easy to convert String to int using various methods. Java also… Read More »

Java Queue

Introduction In Java, Queues are used for pushing in data and retrieving it later. Queue follows the principle of FIFO i.e. First In First Out. In this article, we will discuss the most important methods of Java Queues and give a good amount of Java Queue examples to further the learning process. How to use Java Queue: Examples… Read More »

What is Artificial Intelligence?

Introduction Usually, intelligence is associated with human beings because they have brains. But, as of today, we have seen technological advancements in the field of robotics and machine learning, which leads to an important term: artificial intelligence. Artificial intelligence is the intelligence possessed by machines to do tasks that a human being may or may not be able… Read More »

Java Map

Introduction Map is a very important data structure in Java. There are three types of map implementations: TreeMap, HashMap, and LinkedHashMap. A map contains a key-value pair and has methods to iterate through the map, add elements, remove elements, bulk operations, and so on. In this article, we will discuss how to iterate through HashMap elements in Java.… Read More »