java

Java program to print the ASCII value of an integer

American Standard Code for Information Interchange or ASCII code links an integer value to a symbol like letter, digit , special character etc. In ASCII 7 bits are used to represent a character. From 0 to 127, each number can be represent by a character. In this tutorial, we will learn how to print ASCII value of an integer.

Read
java

Java program to find out the top 3 numbers in an array

In this tutorial, we will learn how to find out the top 3 numbers in an array. Algorithm used in this program is as below :.

Read
java

Java Program to Delete a file using 'File' class

In this example, we will learn how to delete a file in Java. In the below program, the full path of the file is stored in 'fileName' variable. First we create one 'File' object using 'File(fileName)' constructor. Then we will delete that file using 'delete()' function. It will return 'true' if the file is deleted successfully. 'false' otherwise.

Read
java

Java Program to print the sum of square series 1^2 +2^2 + ..... +n^2

In this tutorial, we will learn how to calculate the sum of the series 1^2 +2^2 +3^2 +4^2 + ..... +n^2 ( where n can be any number ) and print out the series with the sum as well.

Read
ios

How to create a Rounded corner UIView in iOS with Swift 4

Rounded corner UIVIew is useful in many cases like to create a custom button or to create a custom notification etc. In this tutorial, we will learn how to create a rounded corner UIView in XCode. This code is compatible with both Swift-3 and Swift-4 :.

Read
java

Java program to find the area and perimeter of an equilateral triangle

In this tutorial, we will learn how to find the area and also perimeter of an equilateral triangle in Java.

Read
java

Java BufferedReader and FileReader example read text file

In this example, I will show you one basic Java File I/O operation - "Reading the contents" of a text file. We will use 'BufferedReader' and 'FileReader' class in this example. What these classes are used to do mainly ?

Read
java

Bubble sort in Java with Examples

Bubble sort repeatedly compares each elements in an array. We will traverse the array from the first element and check if it is greater than the second. If it is greater than the first, we will swap the first element with second. Then we will check the second element with third etc. This swapping will continue until no swap is needed.

Read
java

Java Program to calculate BMI or Body Mass Index

BMI or body mass index can be calculated by taking the weight in pounds and height in inches or by taking the weight in kilograms and height in meters. We have to use a different formula for both cases. In this example, we will learn how to do the calculation by using any of these two different approaches.

Read
swift

Swift 4 Tutorial : Split and Join a String

Sometimes we need to change one part of a string . Suppose you have three different types of url for your image - "http://mysite.com/image/myimage.jpg" for default size, "http://mysite.com/image/myimageh360w360.jpg" for "360*360" sized image and "http://mysite.com/image/myimageh100w100.jpg" for "100*100" sized image. You have access only to the first url and you will have to change it like second and third url. How to do that ?

Read