AmitDiwan has Published 10744 Articles

How to change the color of the placeholder attribute with CSS?

AmitDiwan

AmitDiwan

Updated on 11-Sep-2024 15:43:33

4K+ Views

To change the color of the placeholder attribute with CSS, we will be using ::placeholder pseudo-element which will update the default color of placeholder. In this article, we are having a text type input field with default placeholder color, our task is to change the color of the placeholder attribute ... Read More

How to create a vertical line with CSS?

AmitDiwan

AmitDiwan

Updated on 11-Sep-2024 13:51:37

3K+ Views

To create a vertical line with CSS, is a simple process that can be done using various approaches. In this article, we will learn and understand three different approaches for creating a vertical line with CSS We are using border and some block elements in this article, our task is ... Read More

Java program to calculate sum of squares of first n natural numbers

AmitDiwan

AmitDiwan

Updated on 11-Sep-2024 12:25:33

941 Views

In this article, you will learn to write a program in Java to calculate the sum of squares of first n natural numbers. This program efficiently computes the sum using a mathematical formula − (val * (val + 1) / 2) * (2 * val + 1) / 3 Problem ... Read More

Java program to print star Pascal\'s triangle

AmitDiwan

AmitDiwan

Updated on 09-Sep-2024 01:19:20

722 Views

In this article, we will understand how to print star Pascal’s triangle in Java. The Pascal’s triangle is formed by using multiple for-loops and print statements. All values outside the triangle are considered zero (0). The first row is 0 1 0 whereas only 1 acquire a space in Pascal’s ... Read More

Java program to find missing and additional values in two lists

AmitDiwan

AmitDiwan

Updated on 09-Sep-2024 01:19:06

2K+ Views

In this article, we will learn to find missing and additional values in two lists in Java. By the end of this program, you'll be able to detect elements that exist in one list but not in the other, helping you better manage and analyze data in list comparisons. Problem ... Read More

How to create a navigation bar with left-aligned and right-aligned links with CSS?

AmitDiwan

AmitDiwan

Updated on 05-Sep-2024 17:13:43

11K+ Views

To create a navigation bar with left-aligned and right-aligned links with CSS, user should have a basic understanding of CSS flexbox. First, we will create the structure of navigation bar having five links using HTML, then we will use CSS to design the navigation bar and align the links on ... Read More

Java program to find sum of even factors of a number

AmitDiwan

AmitDiwan

Updated on 05-Sep-2024 11:22:18

921 Views

In this article we’ll find the sum of even factors of a given number using Java. We’ll start by checking if the number is even, then identify all of its factors, sum up those that are even, and finally display the result. Problem Statement Write a Java program to find ... Read More

How to create \"next\" and \"previous\" buttons with CSS?

AmitDiwan

AmitDiwan

Updated on 03-Sep-2024 14:03:51

6K+ Views

To create "next" and "previous" buttons with CSS is a common requirement for web pages, especially for multi-paged content as it eases the navigation through various pages. In this article, we'll be understanding how to create "next" and "previous" buttons with CSS. We are having two anchor tags in our ... Read More

Java program to find the sum of a series 1/1! + 2/2! + 3/3! + 4/4! +…….+ n/n!

AmitDiwan

AmitDiwan

Updated on 30-Aug-2024 11:42:26

1K+ Views

In this program, we'll compute the sum of the series 1/1! + 2/2! + 3/3! + ... + n/n! using Java. This involves calculating factorials and summing the results of each term divided by its factorial. We'll use Java's basic arithmetic, loop control, and built-in classes to achieve this.Problem StatementWrite a ... Read More

Java program to display Hostname and IP address

AmitDiwan

AmitDiwan

Updated on 28-Aug-2024 21:18:08

4K+ Views

In this article, we will learn to display the Hostname and IP address using Java. To display the Hostname and IP address we will be using the InetAddress class from the java.net package. We’ll write a simple program to fetch and print this information, and perform the exception handling to ... Read More

Advertisements