3 ways to concatenate two collections with distinct elements in Kotlin

In ths tutorial, we will learn how to concatenate two collections with distinct elements. We will use two lists to show you the example. If the first list contains elements (1,2,3,4) and the second list contains (5,6,7), the final list after concatenation will hold (1,2,3,4,5,6,7).

Read

Python program to print a star hollow square pattern

In this tutorial program, we will learn how to print a hollow square pattern in Python. You will learn two different ways to print the pattern. We will also learn how to take the character as user input.

Read

Python program to find a substring in a string

How to find a substring in a string in Python. This post will show you how to use find to find a substring in Python programming language

Read

How to find the length of a string in python

We need to find the length of a string most of the time while development of any software. Either you are using python or any other language, finding the string length is one of the most commonly faced problems during software development.

Read

Kotlin program to find out the average marks of a list of students

In this Kotlin example program, we will learn how to find the average marks of a list of students. Our program will create one list of few students first and then it will find out the average marks of these students.

Read

6 different ways to sort an array in Kotlin

How to sort an array in Kotlin in 6 different ways. We will learn how to sort the array in ascending order, descending order, sort an array of custom objects and sorting a part of the array with examples.

Read

Java program to sort an array of integers in ascending order

In this Java programming tutorial, we will learn how to sort an array of integers in ascending order. Our program will first take the inputs from the user and create one integer array. Then it will sort the numbers of the array and print it out again to the user.

Read

How to remove elements of Java ArrayList using removeIf() method

Normally, for removing an element from an arraylist, we iterate through the list one by one using an iterator, check each element if it satisfy a specific condition and if it does, delete it. But, starting from Java-8, we don't need to write all of these code. Java-8 has introduced one new method removeIt() to remove all elements from a collection that satisfy a condition.

Read

Java program to print below and above average marks students

In this Java programming tutorial, we will learn how to find the students who got above or below average marks from a list of students. Mainly, our program will create a list of students with different name and marks for each student. It will then find out the average marks of all of these students. Finally, it will print out the students whose marks is below average and above average.

Read

How to convert a boolean to string in Java

In this quick tutorial, we will learn how to convert a boolean value to string in Java. Not only one, we have two different ways to do the conversion. Let's take a look :.

Read