Found 7421 Articles for Java

Update a Column in a Table using Java JDBC

Bamdeb Ghosh
Updated on 04-Oct-2023 18:04:18

520 Views

Introduction Updating a column in a database table is a relatively frequent activity in software development. Java Database Connectivity (also known as JDBC API), which serves as a link between Java programmers and databases like MySQL, may be used to carry out this task in Java. Using the JDBC API, we may establish a connection to the database, get data from tables, and carry out a number of tasks, including altering columns. We will talk about how to update a column in a table using Java JDBC. We will start by make a connection to the database and then we ... Read More

What's the best RESTful web framework to use with Java

Bamdeb Ghosh
Updated on 04-Oct-2023 17:58:55

156 Views

Introduction Let us talk about what’s the best Java RESTful web framework to use with Java language. We know there are a lot of frameworks available but the “Spring Boot” is the best choice among other Java frameworks. Here we will talk about the usage of the RestTemplate and integration of various data formats including JSON, XML, and HTML using the Spring Boot framework. We will also discuss various approaches to handling HTTP requests. We will learn why Spring Boot is the ideal framework for creating RESTful web services in Java by understanding this article. Support of HTTP in ... Read More

Does it make sense to choose JavaScript instead of Java for server-side programming and why

Bamdeb Ghosh
Updated on 04-Oct-2023 17:54:22

123 Views

Introduction We know that over a period of time JavaScript has gained popularity for its versatility and it’s easy to use. Java remains a top choice for server-side programming due to its reliability, scalability, and large ecosystem. Let us discuss about why choosing Java as a server-side programming language over JavaScript is a better choice. We will talk about different approaches to explain the strengths of Java. Firstly, we will discuss the stability and robustness of Java by using Spring boot. Then we will explain the scalability and performance of Java. At last, we will explain the advantage of server-side ... Read More

Is Java dying at the hands of Oracle What future is there for Java?

Bamdeb Ghosh
Updated on 04-Oct-2023 15:47:55

252 Views

Introduction Java is a widely used programming language since 1995 and Java has played a very important role in software development. Although there are many issues regarding its future due to events involving Oracle. Let us discuss these concerns and explore different viewpoints surrounding future of Java. We will explain whether Java is dying at the hands Oracle's influence or if it has the potential for a promising future. In this article at first, we will discuss about the challenges faced due by Oracle and the simplicity of coding in Java language. After that we will also discuss Java's ... Read More

Maximize Time by Replacing ‘_’ in a given 24-Hour Format Time

Aishwarya Mani Tripathi
Updated on 23-Oct-2023 15:07:43

180 Views

Maximizing time by replacing ‘_’ in a given 24-hour format time is a problem that involves calculating the maximum possible time by replacing the missing digits in a given time in a 24-hour format. The task is to find the maximum time possible by replacing the characters ‘’ with any digit. In this tutorial, we will discuss how to solve this problem using the C++ programming language. We will provide a step-by-step explanation of the algorithm used to calculate the maximum possible time, along with the C++ code to implement the algorithm. Additionally, we will include test examples ... Read More

Flip the String by Either Swapping given Characters or Rotating it Horizontally for Q Queries

Aishwarya Mani Tripathi
Updated on 20-Oct-2023 15:09:31

134 Views

Flip the String by either swapping given characters or rotating it horizontally for Q queries is a fascinating problem that involves manipulating a string based on a series of queries. In this tutorial, we delve into this problem and provide a solution using C++. The problem statement revolves around a string of characters and a set of queries, each containing instructions to swap specific characters or perform a horizontal rotation. Our objective is to determine the final configuration of the string after applying all the queries. Through this tutorial, we will explore the intricacies of the ... Read More

Flip all 0s in given Binary Strings K times with different Neighbours

Aishwarya Mani Tripathi
Updated on 20-Oct-2023 15:04:36

212 Views

The task of flipping 0s in a binary string while considering their adjacent characters has practical applications in various domains. In this tutorial, we delve into the problem of modifying a given binary string by repeatedly flipping the 0s that have different adjacent characters. Specifically, we aim to solve this problem within the context of C++ programming. The solution involves iteratively scanning the string and applying the necessary flips based on the provided logic. By leveraging the string manipulation capabilities, we can efficiently transform the binary string by flipping 0s K times, ensuring that each flip adheres to the ... Read More

Validating Indian vehicle number plate using Regular Expression

Shubham Vora
Updated on 27-Oct-2023 16:21:40

3K+ Views

In this problem, we will validate the Indian vehicle number plate using the regular expression. The regular expression is the search pattern created using the different characters, which we can use to match a particular pattern in the given string. Problem statement - We have given a string representing the Indian vehicle number plate. We need to use the regular expression to validate the given string. Sample Example Input: num1 = "GJ 03 AY 1097" Output: Yes Explanation - The given vehicle number plate is valid. Input: num2 = "TN 1A3 PZ 1287" ... Read More

Print Words with Prime length from a Sentence

Shubham Vora
Updated on 27-Oct-2023 15:24:33

673 Views

In this problem, we need to show all words of the string having the prime length. The logical part of the problem is getting the words from the string and checking whether its length is prime. We can check whether the length of the number is divisible by any number to ensure whether it is a prime number. Also, we will use the sieve of Eratosthenes and the wheel factorization algorithm to check whether the word length is a prime number. Problem statement − We have given a string alpha, and we need to print all words of ... Read More

Minimize operations to make String palindrome by incrementing prefix by 1

Shubham Vora
Updated on 23-Oct-2023 16:10:04

187 Views

In this problem, we will count the number of operations required by increasing the prefix characters of the given string. We will use character difference to count the minimum number of operations required to make string palindromic. Problem Statement We have given a string nums containing the numeric digits. We need to count a minimum number of operations required to convert a string into the palindrome. In one operation, we can select any prefix of the string and increment all prefix characters by 1. Sample Example Input nums = "22434" Output 2 Explanation ... Read More

Advertisements