AmitDiwan has Published 11365 Articles

JavaScript program to find area of a circle

AmitDiwan

AmitDiwan

Updated on 14-Jun-2024 14:53:59

14K+ Views

We will be using the below formula to find the area of a circle − pi * r^2 In the program, we will prompt the user to input the radius of the circle. Then, we will use the formula to calculate the area and print it on the ... Read More

Java Program to pass method call as arguments to another method

AmitDiwan

AmitDiwan

Updated on 14-Jun-2024 14:49:44

21K+ Views

In this article, we will understand how to pass method call as arguments to another method. We can call a method from another class by just creating an object of that class inside another class. After creating an object, call methods using the object reference variable.Below is a demonstration of ... Read More

Java Program to Print Square Star Pattern

AmitDiwan

AmitDiwan

Updated on 31-May-2024 17:40:27

9K+ Views

In this article, we will understand how to print square star pattern. The pattern is formed by using multiple for-loops and print statements.Below is a demonstration of the same −InputSuppose our input is −Enter the length of a side : 8OutputThe desired output would be −The square pattern : * ... Read More

Java Program to Capitalize the first character of each word in a String

AmitDiwan

AmitDiwan

Updated on 31-May-2024 16:49:35

7K+ Views

A string is a class of 'java.lang' package that stores a series of characters. Those characters are actually String-type objects. We must enclose the value of string within double quotes. Generally, we can represent characters in lowercase and uppercase in Java. And, it is also possible to convert lowercase characters ... Read More

Java Program to Display All Prime Numbers from 1 to N

AmitDiwan

AmitDiwan

Updated on 31-May-2024 13:09:20

29K+ Views

In this article, we will understand how to display all the prime numbers from 1 to N in Java. All possible positive numbers from 1 to infinity are called natural numbers. Prime numbers are special numbers who have only two factors 1 and itself and cannot be divided by any ... Read More

Java Program to Convert Array into Collection

AmitDiwan

AmitDiwan

Updated on 19-Jan-2024 14:51:03

329 Views

In this article, we will understand how to convert array into collection. The Collection is a framework that provides architecture to store and manipulate the group of objects. Java Collections can achieve all the operations that you perform on a data such as searching, sorting, insertion, manipulation, and deletion.Below is ... Read More

Using the CSS3 Linear and Radial Gradients

AmitDiwan

AmitDiwan

Updated on 02-Jan-2024 19:14:13

167 Views

Gradients displays the combination of two or more colors. Linear gradients are used to arrange two or more colors in linear formats like top to bottom. Radial gradients appear at center. Linear-Gradient The linear gradient is set using the background-image property. The angle is set as the first parameter. Here ... Read More

Using the combination of Percentage and Em in CSS

AmitDiwan

AmitDiwan

Updated on 02-Jan-2024 19:13:10

255 Views

We can use a combination of percentage and em to specify the font-size of elements for better compatibility of font. This allows us to have uniform text across different browsers. Both percentage and em are relative measurements. Syntax The syntax of CSS font-size property is as follows. The below works ... Read More

Using CSS :placeholder-shown to Customize Styles for Empty Text Input

AmitDiwan

AmitDiwan

Updated on 02-Jan-2024 19:08:16

219 Views

To customize the style for the input textbox having a placeholder, we use the :placeholder-shown pseudo-class of CSS. Placeholder text is a hint for the user to understand what is to be typed in the input text field. The following examples illustrate CSS :placeholder-shown pseudo-class. Set the border for the ... Read More

Universal Selector in CSS

AmitDiwan

AmitDiwan

Updated on 02-Jan-2024 19:06:30

1K+ Views

The CSS * selector is a universal selector which is used to select all elements of the HTML DOM. If you want to set a similar style for the entire document, then use the Universal selector. Syntax The syntax for CSS universal selector is as follows: Place the styles you ... Read More

Advertisements