Ankith Reddy has Published 1070 Articles

Java program to find the circumference of a circle

Ankith Reddy

Ankith Reddy

Updated on 24-Jun-2024 15:46:10

5K+ Views

The circumference of a circle is double the product of its radius and the value of PI. Therefore, to calculate the circumference of a circleGet the radius of the circle form the user.Calculate the productPrint the final result.Example: Finding the circumference of a circle import java.util.Scanner; public class CircumfrenceOfCircle { ... Read More

Java program to find the 2nd smallest number in an array

Ankith Reddy

Ankith Reddy

Updated on 21-Jun-2024 11:21:08

9K+ Views

To find the 2nd smallest element of the given array, first of all, sort the array.Sorting an arrayCompare the first two elements of the arrayIf the first element is greater than the second swap them.Then, compare 2nd and 3rd elements if the second element is greater than the 3rd swap ... Read More

Java program to print the Armstrong numbers between two numbers

Ankith Reddy

Ankith Reddy

Updated on 18-Jun-2024 15:34:13

14K+ Views

An Armstrong number is a number which equals to the sum of the cubes of its individual digits. For example, 153 is an Armstrong number as −153 = (1)3 + (5)3 + (3)3 153 1 + 125 + 27 154 153Algorithm1. Take integer variable Arms. 2. Assign a value to ... Read More

Java program to convert the contents of a Map to list

Ankith Reddy

Ankith Reddy

Updated on 31-May-2024 13:36:10

26K+ Views

The Map class's object contains key and value pairs. You can convert it into two list objects one which contains key values and the one which contains map values separately. To convert a map to list − Create a Map object. Using the put() method ... Read More

Get Synchronized List from ArrayList in java

Ankith Reddy

Ankith Reddy

Updated on 12-Mar-2024 17:51:24

3K+ Views

In order to get a synchronized list from an ArrayList, we use the synchronizedList(List ) method in Java. The Collections.synchronizedList(List ) method accepts the ArrayList as an argument and returns a thread safe list.Declaration −The Collections.synchronizedList(List ) method is declared as follows −public static List synchronizedList(List list)Let us ... Read More

Recycler view item animate when scrolling in Android

Ankith Reddy

Ankith Reddy

Updated on 04-Mar-2024 13:22:39

1K+ Views

Before getting into Item animation for recycler view example, we should know what is Recycler view in android. Recycler view is a more advanced version of the list view and it works based on View holder design pattern. Using recycler view we can show grids and list of items.card view ... Read More

HTML <base> target Attribute

Ankith Reddy

Ankith Reddy

Updated on 29-Feb-2024 14:31:18

309 Views

The target attribute of the element is used to set the default target for the hyperlinks in a document. Syntax Following is the syntax − Here, _blank is used to open the linked document in new window or tab, _self opens the linked document in the ... Read More

How to change the playing speed of videos in HTML5?

Ankith Reddy

Ankith Reddy

Updated on 21-Nov-2023 21:00:26

1K+ Views

Use the playbackRate property sets the current playback speed of the audio/video. With that, the defaultPlaybackRate property sets the default playback speed of the audio/video. Change the playing speed of videos You can try to run the following code to change the playing speed of videos − /* play video ... Read More

isalpha() and isdigit() in C/C++

Ankith Reddy

Ankith Reddy

Updated on 07-Nov-2023 13:17:18

34K+ Views

isalpha() The function isalpha() is used to check that a character is an alphabet or not. This function is declared in ctype.h header file. It returns an integer value, if the argument is an alphabet otherwise, it returns zero. Here is the syntax of isalpha() in C language, int isalpha(int ... Read More

What is IEEE 802.3?

Ankith Reddy

Ankith Reddy

Updated on 03-Nov-2023 14:26:56

30K+ Views

IEEE 802.3 is a set of standards and protocols that define Ethernet-based networks. Ethernet technologies are primarily used in LANs, though they can also be used in MANs and even WANs. IEEE 802.3 defines the physical layer and the medium access control (MAC) sub-layer of the data link layer for ... Read More

1 2 3 4 5 ... 107 Next
Advertisements