Java program to print hello world or any other string without semicolon. We will use if-else statement, for loop and StringBuilder append method to print the message without any semicolon in Java.
ReadJava program to find the power of a number using recursion. This post will show you what is a recursive function and how to find the power of a number using recursion in Java.
ReadJava program to calculate compound interest with user-input values. Learn the formula to calculate compound interest and how to write it programmatically using Java.
ReadJava program to print the total number of days in a given month of a year. The program will take the month and year values as inputs from the user and print the number of days for that month in 5 different ways.
ReadJava program to remove all white spaces from a file. This program will show you how to read a text file line by line and how to remove all white spaces from the lines of this file with an example.
ReadJava program to print an upper triangular matrix. This program will take one matrix as its input and convert it to an upper triangular matrix.
ReadJava program to print odd numbers from 1 to 100 or in a given range. We will learn three different ways to print all odd numbers in a user-given range using Java.
ReadLearn how to convert an image to Base64 in 2 different ways in Java. We will use ImageIO and nio.file.Files to do the Base64 conversion with examples in this post.
ReadLearn how to convert a list to set in Java in different ways. This post will show you 4 different ways to convert a list to set in Java with example programs.
ReadLearn how to check for disjoint sets in Java in two different ways. We will use iterative approach and Collections.disjoint method to check for disjoint sets in this example.
Read