This tutorial will show you how to swap case of each character of a string. For example, if the string is Hello, it will change it to hELLO.
ReadIn this C programming tutorial, we will learn how to insert an element in an array at any user-provided specific position. The array elements will be entered by the user.The program will print out the final array after the insertion is completed. For example, if our original array is [1,2,3,4] and if one new value 5 is inserted on the third position, the program will print out [1,2,5,3,4] as the output.
ReadIn this C programming tutorial, we will learn how to write a program to find out the simple interest. The user will enter the input values and the program will calculate and print out the result to the user.
ReadIn this tutorial, we will learn how to remove an item from a list in python. We can divide this problem into three categories- removing an element using its value, using an index and remove all elements.
ReadConvert a string to a date in Kotlin with example. We will use java.util.LocalDate class to convert a string to a Date.
ReadIn this tutorial, we will learn how to take user input in Kotlin with different examples. Reading user input in Kotlin is easy. Kotlin provides one inbuilt function to make this task easy for us.readLine() function allow us to read the input that is entered by the user. This function actually read the input as a string. We can convert it to a different datatype if we want.Alternatively, we can also use Scanner class to read the content of user input.
ReadSafe call operator is denoted by ? in Kotlin. This operator is mainly used to remove null pointer exception or NPE in Kotlin. In this tutorial, we will learn how to use safe call operator in Kotlin with different use cases.In this tutorial, we will learn how to use safe call operator in Kotlin with different use cases.
ReadNamed argument is used to improve the readability of a kotlin function. Named argument, as the name suggested is arguments with a name. For example, let's take a look at the below function :.
ReadElvis operator is used to removing null pointer exception in Kotlin. We can use it to check if any variable is null or not and it allows us to use one default value if the value is null.The syntax of elvis operator is ?.
ReadDouble bang (!!) or double exclamation operator or not-null assertion operator is used with variables if you are sure that the value will be always non-null.If a value is null and if we are using not-null assertion operator, it will throw one null pointer exception.So, we should use this operator only if we want to throw one exception always if any null value found.
Read