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.
ReadFinding 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.
ReadList 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 :.
ReadIn 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 :.
ReadIn 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 :.
ReadFor 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 :.
ReadIn 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.
Readstrictfp 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.
ReadThis 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.
ReadIn 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