Python program to pad zeroes to a string

In this python programming tutorial, we will learn how to pad extra zeros to a string. For example, if the string is 2, and if we pad three zeros to this string, it will become 0002. Similarly, we can pad zeros to any type of string like 00Hello or 000world. We can pad any number of zeros to a string.

Read

Python tutorial to calculate the sum of two string numbers

Finding the sum of two numbers if both numbers are integer or float, is not a problem. But what will happen if the numbers are string variable? Like "10", "20" etc ? In this python tutorial, we will learn how to find the sum of two numbers if both of them are in String.

Read

Dart list : Explanation with example

List or array of similar items is used in all programming languages.In dart, this is represented by array or commonly known as lists. List is an ordered group of objects. The index of the list starts from 0.So, the index of the first element is 0,second element is 1 etc. Using this index,we can access any value for a specific position in the list.Creating a simple looks like as below :.

Read

Dart example program to iterate through a list

In this tutorial, we will learn how to iterate through a list of items in dart. List holds items of similar type. The sample program we are going to check here will first create one list of integers, then it will add few integers to the list and finally it will iterate through the list and print out the values. Let's take a look :.

Read

Kotlin program to calculate the total number of digits in a number

In this Kotlin programming tutorial, we will learn how to calculate the total number of digits in a number. For example, 1245 has four digits. This example is mainly for Kotlin beginners. If you have started learning Kotlin after Java, we have also included the Java version of the same problem. It will show you :.

Read

How to run a Kotlin program using command line

For running a Kotlin program, what IDE you use ? IntellijIdea,Eclipse Visual Studio Code or anything else ? We can also run a Kotlin program using command line. If you love working with command line, you can use Kotlin compiler to compile and run a program directly. In this tutorial, we will learn how to do this. Let's take a look :.

Read

Java program to convert a string to an array of string

In this Java programming tutorial, we will learn how to convert a string to an array of strings. For example, if our input is Hello World, the output will be an array containing both of these words. We will show you two different and most popular ways to solve it.

Read

Java strictfp keyword : Explanation with example

strictfp keyword is used for getting the same result of floating point calculation on different platforms. We cannot use strictfp with a class constructor or with methods defined inside an interface. But we can define an interface as strictfp and then all the methods defined inside that interface will become strictfp automatically. Similarly, we can use strictfp for class and methods also.

Read

4 ways in Java to sort a String alphabetically

This post will show you how to sort a String in Java in 4 different ways. It will use loops, by converting the String to an Array, by using a comparator and by using Stream.

Read

Java deep copy example using SerializationUtils

In Java, copy an object is not an easy task as it looks like. Most of us makes this mistake during the initial days of our development carreer. In Java, objects are not passed by value. For example, let's take a look at the program below :.

Read