In this article, we will learn to remove a character from a string at a specified position using Java. We will use the substring() method to achieve this by splitting the string before and after the character we want to remove, then combining the two parts Problem Statement Write a program in Java to remove a character at a specified position. Input The Haunting of Hill House! Output String after removing a character: The Hauting of Hill House! Steps to remove a character at a specified position Following are the steps to remove a character at a specified position − ... Read More
In this article, we will learn to get the difference between two time zones by seconds using Java. We'll use LocalDateTime, ZoneId, and ZonedDateTime classes from java.time package to achieve this.Problem Statement Write a program in Java to get the difference between two time zones by seconds − Output Difference between two time zones in seconds = 28800 Steps to get the difference between two time zones by seconds Following are the steps to get the difference between two time zones by seconds − First, we will import the necessary classes LocalDateTime, ZoneId, and ZonedDateTime from ... Read More
In this article, we will learn to add 3 months to the calendar. We will take the current date and add 3 months to it using Calendar class in Java. You’ll see how to handle date manipulation and update the date accordingly. Problem Statement Write a program in Java to add 3 months to the calendar. Below is the demonstration of the same − Input Current Date = Fri Nov 23 06:38:56 UTC 2018 Output Updated Date = Sat Feb 23 06:38:56 UTC 2019 Different approaches Below are the different approaches to add 3 months to the calendar − ... Read More
In this article we will learn to print Pascal's triangle in Java. Pascal's triangle is one of the classic examples taught to engineering students. It has many interpretations. One of the famous ones is its use with binomial equations. All values outside the triangle are considered zero (0). The first row is 0 1 0 whereas only 1 acquires a space in Pascal’s triangle, 0s are invisible. Second row is acquired by adding (0+1) and (1+0). The output is sandwiched between two zeroes. The process continues till the required level is achieved. Problem Statement Write a program in Java to print ... Read More
In this article, we will learn to change JLabel text after creation in Java. We'll cover two scenarios: changing the label text immediately after creation and updating it in response to a button click. Different approaches to change JLabel text after creation Below are the different approaches to change JLabel text after the creation − Using setText() Method Using a button click Update JLabel text using setText() method Following are the steps to update JLabel text immediately after creation − First we will import JFrame, JLabel, and ... Read More
Regex or Regular Expression is the language used for pattern-matching and string manipulation. It consists of a sequence of characters that define a search pattern and can be used for performing actions like search, replace, and even validate on text input. A regular expression consists of a series of characters and symbols that amount to form a search pattern. In this article, we are going to see how to write a Java program to extract a single quote-enclosed string from a larger string using Regex. Java provides support for regex from the java.util.regex package. The pattern class represents a compiled ... Read More
What is Gamification? Gamification is a technique in which games are added to a non-game environment which helps in keeping the people engaged. Gamification is performed so that consumers can be attracted and engaged and partners can be invited for collaboration. This is a technique in which a game-like environment is produced for the motivation and engagement of users. Game principles and game design elements are used for gamification. Types of Gamification There are different types of gamifications which we will discuss here in detail − 1. Educational Gamification Gamification can be introduced in the field of education where ... Read More
To align checkbox and its label on cross-browsers using CSS, we can use various CSS properties. Different browsers may have different styles and rendering methods while displaying checkboxes. In this article, we will be discussing three different approaches to align checkbox and its label on cross-browsers using CSS for consistent display and proper alignment. We are having two checkboxes and two corresponding labels in this article, our task is to align checkbox and its label on cross-browsers using CSS. Approaches to Align Checkbox and its Label on Cross Browsers Here is a list of approaches to align checkbox and its ... Read More
Git is version control system that is used for managing the code changes during the software development. Git stores the changes as snapshots which are staged and then committed. Not just the changes in code, git will also stores information about the addition and deletion of files. Sometimes, you may want to unstage or revert the deletion of a file before committing it. This article will guide you through the process of unstaging a file in Git, providing a step-by-step explanation.Steps to Unstage a Deleted FileStep 1: Check the StatusFirst check the status of the deleted file which has been ... Read More
CSS :even and :odd psuedo classes are used to select or target the alternative child elements. CSS even and odd psuedo class is used with list items to create alternate style like text color, background which increases the readability. In this article, we are having an unordered list. We will be understanding use of :even and :odd pseudo-classes with list items. CSS odd Psuedo-Class CSS even Psuedo-Class CSS odd Psuedo-Class The :odd pseudo-class is used to select the HTML elements which are at odd positions. We can use the :odd ... Read More
 
 Data Structure
 Data Structure Networking
 Networking RDBMS
 RDBMS Operating System
 Operating System Java
 Java MS Excel
 MS Excel iOS
 iOS HTML
 HTML CSS
 CSS Android
 Android Python
 Python C Programming
 C Programming C++
 C++ C#
 C# MongoDB
 MongoDB MySQL
 MySQL Javascript
 Javascript PHP
 PHP 
		 
		 
		 
		 
		