Ankith Reddy has Published 1070 Articles

Find max and min values in array of primitives using Java

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 07:37:59

547 Views

This example shows how to search the minimum and maximum element in an array by using Collection.max() and Collection.min() methods of Collection class.Example Live Demoimport java.util.Arrays; import java.util.Collections; public class Main {    public static void main(String[] args) {       Integer[] numbers = { 8, 2, 7, 1, 4, ... Read More

CopyOnWriteArrayList Class in Java programming

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 07:29:45

171 Views

Class declarationpublic class CopyOnWriteArrayList extends Object implements List, RandomAccess, Cloneable, SerializableCopyOnWriteArrayList is a thread-safe variant of Arraylist where operations which can change the arraylist (add, update, set methods) creates a clone of the underlying array.CopyOnWriteArrayList is to be used in Thread based environment where read operations are very frequent and ... Read More

Support for line-oriented command interpreters in Python

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 06:29:29

353 Views

The cmd module contains only one class called Cmd. This is used as base class for a user defined framework for line oriented command line interpreters.CmdAn object of this class or its subclass provides the line oriented interpreter framework. Important methods of this class inherited by the subclass are listed ... Read More

How to Convert Hexadecimal to Decimal?

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 06:29:13

16K+ Views

Whereas Hexadecimal number is one of the number systems which has value is 16 and it has only 16 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and A, B, C, D, E, F. Where A, B, C, D, E and F are single bit representations of ... Read More

Octal Number System

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 06:25:16

12K+ Views

Octal Number System is one the type of Number Representation techniques, in which there value of base is 8. That means there are only 8 symbols or possible digit values, there are 0, 1, 2, 3, 4, 5, 6, 7. It requires only 3 bits to represent value of any ... Read More

Python Support for bzip2 compression (bz2)

Ankith Reddy

Ankith Reddy

Updated on 26-Jun-2020 06:20:36

2K+ Views

The bzip2 is an open source algorithm for compression and decompression of files. Python’s bz2 module provides functionality to implement bzip2 algorithm programmatically.The open() function is the primary interface to this module.Open()This function opens a bzip2 compressed file and returns a file object. The file can be opened as binary/text ... Read More

How to Convert Decimal to Octal?

Ankith Reddy

Ankith Reddy

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

17K+ 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

390 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

74 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; }

Advertisements