Ankith Reddy has Published 996 Articles

How to Convert Decimal to Octal?

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 06:05:00

18K+ Views

Decimal system is most familiar number system to the general public. It is base 10 which has only 10 symbols − 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. Whereas octal system is one of the number systems to represent numbers. It is base 8 which has ... Read More

What is difference between gravity and layout_gravity on Android?

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 05:48:05

1K+ Views

Android supports both gravity and layout_gravity. Gravity adjusts view position. Using gravity we can do alignment of view as shown below.In the above code Textview going to set in middle of parent layout.Properties of GravityCenter − it going to put view in center of parent layout.Right − it going to ... Read More

Format currency with Java MessageFormat

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 15:07:07

569 Views

To format message with currency fillers in Java, we use the MessageFormat class. The MessageFormat class gives us a way to produce concatenated messages which are not dependent on the language. The MessageFormat class extends the Serializable and Cloneable interfaces.Declaration −The java.text.MessageFormat class is declared as follows −public class MessageFormat ... Read More

CSS voice-pitch Speech Media property

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 14:58:21

107 Views

The voice-pitch property in CSS is used to set the baseline pitch of the speaking voice. Here, you can set the pitchvoice-pitch: [[x-low | low | medium | high | x-high]]The following is an examplep {    voice-pitch: low; }

Animate transform-origin property with CSS Animation

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 14:44:43

997 Views

To implement animation on the transform-origin property with CSS, you can try to run the following codeExampleLive Demo                    #demo1 {             position: relative;             height: 300px;       ... Read More

CSS voice-balance Speech Media property

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 14:41:22

163 Views

Use the voice-balance property to set whether the spoken voice is from the left or right, etc.The following is a syntax to set the volume from left or right or centervoice-balance: left | center | rightLet us see an example to implement the voice-balance speech media propertyp {    voice-balance: right; }

Dump the content of an array in Java

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 14:40:53

349 Views

An array can be easily printed by using the method java.util.Arrays.toString() in Java. This method returns a string representation of the array contents that is enclosed in square brackets. If the array is null, then this method returns null.A program that demonstrates this is given as follows −Example Live Demoimport java.util.Arrays; ... Read More

CSS voice-volume Speech Media property

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 14:36:15

207 Views

Adjust the relative volume level using the voice-volume CSS property.The following is the syntax:voice-volume: [x-soft | soft | medium | loud | x-loud]The following is a code snippet for the voice-volume speech media property:p {    voice-volume: soft; }You can also set the volume in decibalsp {    voice-volume: 2dB; ... Read More

Compare two short arrays in a single line in Java

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 14:36:14

323 Views

Two short arrays can be compared in Java using the java.util.Arrays.equals() method. This method returns true if the arrays are equal and false otherwise. The two arrays are equal if they contain the same number of elements in the same order.A program that compares two short arrays using the Arrays.equals() ... Read More

Reverse order of all elements of ArrayList with Java Collections

Ankith Reddy

Ankith Reddy

Updated on 25-Jun-2020 14:33:30

2K+ Views

In order to reverse order of all elements of ArrayList with Java Collections, we use the Collections.reverse() method.Declaration −The java.util.Collections.reverse method is declared as follows −public static void reverse(List list)Let us see a program to reverse order of all elements of ArrayList with Java Collections −Example Live Demoimport java.util.*; public class ... Read More

Advertisements