python

How to convert float to integer in Python

Python program to convert float to integer. We can use int() or math.floor or math.ceil methods to convert float to integer in python.

Read
python

Python program to append text to a file

Python program to append text to a file. We will learn different ways to append text to a file using Python.

Read
javascript

JavaScript example to add padding to the end of a string using padEnd

Learn how to add padding to the end of a string in JavaScript. We will use padEnd method to add padding to the string end.

Read
javascript

How to add one second delay in JavaScript

JavaScript program to add one second delay. We will learn how to do it by using a setTimeout, using a promise, using arrow function and by using async-await.

Read
javascript

JavaScript Map forEach method example

JavaScript Map forEach method explanation with example. Map is used to hold key-value pairs. Using forEach we can iterate through the pairs one by one.

Read
java

Java program to check if a number is special or not

Java program to check if a number is special or not. It will take one number as input from the user and print if it is a special number or not.

Read
java

Create a Rectangle class in Java and calculate area, perimeter

Java program to create a Rectangle class that can calculate the area and perimeter using different methods.

Read
java

Java program to find special numbers in a range

Java program to find special numbers in a range. A number is called special if the sum of factorials of digits of the number is equal to itself.

Read
java

Can Enum implements interfaces in Java

Can Enum implements interfaces in Java or not. Enum is used to define a list of constants in Java. Learn this with an example.

Read
java

5 Different ways to append text to a file in Java

Different ways in Java to append text or strings to a file. We will use FileOutputStream, BufferedWriter, PrintWriter, FileWriter and Files to do that.

Read