AmitDiwan has Published 11367 Articles

How to create a hoverable dropdown menu with CSS?

AmitDiwan

AmitDiwan

Updated on 27-Jun-2024 18:09:42

2K+ Views

Hoverable dropdown is dropdown that opens when we hover on that dropdown. This kind of dropdown are mostly used on header menu. If the user hover over on any element of the header menu then it will automatically open and render the content of that dropdown. Steps to Create ... Read More

Java Program to Print X Star Pattern

AmitDiwan

AmitDiwan

Updated on 25-Jun-2024 15:53:54

8K+ Views

In this article, we will understand how to print X star pattern. The pattern is formed by using multiple for-loops and print statements. Below is a demonstration of the same: − Input Suppose our input is − Enter the number : 8 Output The desired output would be − The ... Read More

Java Program to Display Alphabets (A to Z) using loop

AmitDiwan

AmitDiwan

Updated on 21-Jun-2024 14:44:23

9K+ Views

In this article, we will understand how to print alphabets from A to Z or a to z in Java. This is accomplished using a simple for loop.Below is a demonstration of the same −InputSuppose our input is −A to ZOutputThe desired output would be −A B C D E ... Read More

Java Program to Add the two Numbers

AmitDiwan

AmitDiwan

Updated on 21-Jun-2024 14:21:29

9K+ Views

When we enter the coding world there are various mathematical operations that we learn to do through programming languages. We are expected to begin our coding journey with basic mathematical operations like adding, subtracting, multiplying and dividing. To evaluate the sum of two numbers, we use the '+' operator. However, ... Read More

Java Program to Check Armstrong Number

AmitDiwan

AmitDiwan

Updated on 21-Jun-2024 13:03:25

9K+ Views

In number theory, an Armstrong number is a pattern based number whose sum of each digit raised to the power of total number of digits is equal to the given number itself. Hence, to check whether a number is an Armstrong or not, first, determine the total number of digits ... Read More

Java program to count the occurrence of each character in a string using Hashmap

AmitDiwan

AmitDiwan

Updated on 21-Jun-2024 12:41:28

8K+ Views

To count the occurrence of each character in a string using Hashmap, the Java code is as follows −Example Live Demoimport java.io.*; import java.util.*; public class Demo{    static void count_characters(String input_str){       HashMap my_map = new HashMap();       char[] str_array = input_str.toCharArray();       for ... Read More

Java Program to Implement Multiple Inheritance

AmitDiwan

AmitDiwan

Updated on 21-Jun-2024 12:33:10

14K+ Views

In this article, we will understand how to implement multiple inheritance. Java does not support multiple inheritance. This means that a class cannot extend more than one class, but we can still achieve the result using the keyword 'extends'.Algorithm to Implement Multiple InheritanceStep 1 – START Step 2 – Declare ... Read More

JavaScript program to find Area and Perimeter of Rectangle

AmitDiwan

AmitDiwan

Updated on 21-Jun-2024 12:19:35

5K+ Views

We are writing a JavaScript program to calculate the area and perimeter of a rectangle. The program will prompt the user to input the width and length of the rectangle, and then we will use these values to calculate the area and perimeter. We will be continuously using these formulas: ... Read More

JavaScript Program to find simple interest

AmitDiwan

AmitDiwan

Updated on 18-Jun-2024 18:26:35

6K+ Views

We will use the formula for simple interest to calculate the interest for a given principal amount, rate of interest, and time period. Simple interest is calculated as the product of the principal amount, rate of interest, and time period. This formula makes it easy for us to find the ... Read More

Java Program to Compute the Sum of Diagonals of a Matrix

AmitDiwan

AmitDiwan

Updated on 18-Jun-2024 17:51:56

8K+ Views

In this article, we will understand how to compute the sum of diagonals of a matrix. The matrix has a row and column arrangement of its elements. The principal diagonal is a diagonal in a square matrix that goes from the upper left corner to the lower right corner.The secondary ... Read More

1 2 3 4 5 ... 1137 Next
Advertisements