Java Program to Generate Multiplication Table
Example 1: Generate Multiplication Table using for loop public class MultiplicationTable { public static void main(String[] args) { int num = 5; for(int i = 1; i <= 10; ++i)…
Example 1: Generate Multiplication Table using for loop public class MultiplicationTable { public static void main(String[] args) { int num = 5; for(int i = 1; i <= 10; ++i)…
Example 1: Find Factorial of a number using for loop public class Factorial { public static void main(String[] args) { int num = 10; long factorial = 1; for(int i…
Example 1: Sum of Natural Numbers using for loop public class SumNatural { public static void main(String[] args) { int num = 100, sum = 0; for(int i = 1;…
Example 1: Java Program to Check Alphabet using if else public class CheckAlphabet { public static void main(String[] args) { //declare a variable char c = 'E'; //check if c…
Example: Check if a Number is Positive or Negative using if else public class CheckPositiveNegative { public static void main(String[] args) { double number = 14.3; // true if number…
Leap year is a year which is divisible by 4 and if a century year is a leap year then it must be divisible by 400. Example: Java Program to…
Example 1: Java Program to Convert int to double using Typecasting class IntToDouble { public static void main(String[] args) { // create two int variables int a =99; int b…
Example 1: Java Program to Convert int to string using valueOf() class IntToString { public static void main(String[] args) { // create two int variable int num1 = 56; int…
Example 1: Java Program to Convert string to int using parseInt() class StringToInt { public static void main(String[] args) { // create two string variables String str1 = "43"; String…
Spring boot interview Questions Que 1: What is Auto Configuration? This page is still under development. Please come back later... Que 2: What are Spring Boot Starter Projects? Que 3:…