George John has Published 1081 Articles

Fibonacci of large number in java

George John

George John

Updated on 26-Jun-2020 07:39:23

762 Views

Fibonacci numbers of Fibonacci series grows exponentially and can be very large for large numbers like 500 or 1000. To handle such number, long data type is not sufficient. BigInteger can handle large number easily. BigInteger is useful in scenarios where calculations results in data which is out of limit ... Read More

Compare two Strings lexicographically in Java programming

George John

George John

Updated on 26-Jun-2020 07:30:58

399 Views

We can compare two strings lexicographically using following ways in Java.Using String.compareTo(String) method. It compares in case sensitive manner.Using String.compareToIgnoreCase(String) method. It compares in case insensitive manner.Using String.compareTo(Object) method. It compares in case sensitive manner.These methods returns the ascii difference of first odd characters of compared strings.Example Live Demopublic class Tester ... Read More

How to create the immutable class in Java?

George John

George John

Updated on 26-Jun-2020 07:27:35

358 Views

An immutable class object's properties cannot be modified after initialization. For example String is an immutable class in Java. We can create a immutable class by following the given rules below.Make class final − class should be final so that it cannot be extended.Make each field final − Each field ... Read More

Difference between TreeMap, HashMap and LinkedHashMap in Java programming

George John

George John

Updated on 26-Jun-2020 07:25:35

712 Views

HashMap, TreeMap and LinkedHashMap all implements java.util.Map interface and following are their characteristics.HashMapHashMap has complexity of O(1) for insertion and lookup.HashMap allows one null key and multiple null values.HashMap does not maintain any order.TreeMapTreeMap has complexity of O(logN) for insertion and lookup.TreeMap does not allow null key but allow multiple ... Read More

Hexadecimal Number System

George John

George John

Updated on 26-Jun-2020 06:21:48

15K+ Views

Hexadecimal Number System is one the type of Number Representation techniques, in which there value of base is 16. That means there are only 16 symbols or possible digit values, there are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. Where A, ... Read More

How to display HTML in TextView in Android?

George John

George John

Updated on 26-Jun-2020 05:51:31

6K+ Views

In Some situations, we should need to show HTML as text in android. Here is the simple solution to show HTML in TextView in android.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step ... Read More

How to create a notification with NotificationCompat.Builder in Android?

George John

George John

Updated on 26-Jun-2020 05:38:04

4K+ Views

Before getting into NotificationCompact.Builder, we should know what is a notification in android. Notification is just like as a message showing system on the action bar. just like missed call notification as shown belowThis example demonstrates how to integrate Android Notification.Step 1 − Create a new project in Android Studio, ... Read More

Java Program to implement Binary Search on long array

George John

George John

Updated on 25-Jun-2020 15:03:26

270 Views

Binary search on a long array can be implemented by using the method java.util.Arrays.binarySearch(). This method returns the index of the required long element if it is available in the array, otherwise it returns (-(insertion point) - 1) where the insertion point is the position at which the element would ... Read More

CSS speak-as Speech Media property

George John

George John

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

126 Views

Set whether the text is to be spoken or spelled using the speak-as speech media property.You can spell the text, speak the numeral, etc. To spell out, the following is an exampleabbr {    speak-as: spell-out; }Above, I have used spell-out that spells out one letter at a time.

CSS voice-duration Speech Media property

George John

George John

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

210 Views

The voice-duration property in CSS is used where synchronization of speech is done with other media.The following is an example to implement the voice-duration speech media propertyp {    voice-duration: 5s; }Above you can set auto value also.The auto value rectify a used value corresponding to the duration of the speech ... Read More

Advertisements