java

Different ways to add elements to an ArrayList in Java

Learn to add an element to the end of the ArrayList or at any specific position of the ArrayList in Java. This post will explain these with examples.

Read
java

Can we execute a Java program without the main method

Learn if we can execute a Java program without the main method or not. This post will give you an idea on static blocks of Java with examples.

Read
java

How to handle multiple exceptions in Java

Learn to handle multiple exceptions in Java with different catch blocks or with one single catch block with example for each.

Read
java

Can we have multiple public Java classes in one file

Learn if we can have two or more public classes in one file in Java or not. This post will explain it to you with different examples.

Read
java

3 different Java programs to find the next prime number

Java program to find the next prime number in 3 different ways. The program will take one number as an input from the user and print the next prime number found starting from the next number.

Read
java

Java program to calculate student's grades in 2 different ways

Java program to calculate the grade of a student with user input marks. The program will take the marks and print the grade for a student.

Read
python

How to change the values of a dictionary in Python

How to change the values of a dictionary in Python. We will learn to use keys and the update method to change Python dictionary values with examples.

Read
python

How to remove items from a dictionary in Python

Learn how to remove items from a dictionary in Python. This post will show you how to remove single item, delete a dictionary and clear all items from a dictionary.

Read
javascript

JavaScript program to find if a number is a Magic number or not

JavaScript program to check if a number is a magic number or not. This post will show you how to check for a magic number by using while loops and with HTML.

Read
javascript

How to convert an image to Base64 in JavaScript

JavaScript program to convert an image to Base64. We will learn how to find the Base64 of a local image and a remote image with HTML example programs.

Read