Java program to find the ASCII value

Post Views: 0 Example: Find ASCII value of a character public class AsciiValue { public static void main(String[] args) { char ch = ‘a’; int ascii = ch; // You…

Read more »

Java program to print Fibonacci Series

Post Views: 0 The Fibonacci sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21, … Example 1: Display Fibonacci series using for loop public class Fibonacci { public static…

Read more »

Java program to check if number is positive or negative

Post Views: 0 Example: Check if a Number is Positive or Negative using if else public class PositiveNegative { public static void main(String[] args) { double number = 12.3; //…

Read more »

Java Program to find palindrome for a number

Post Views: 0 Example 1: Program to Check Palindrome using while loop public class Palindrome { public static void main(String[] args) { int num = 121, reversedInteger = 0, remainder,…

Read more »

Java program to find largest number from 3 numbers

Post Views: 1 Example 1: Find Largest Among three numbers using if..else statement public class Largest { public static void main(String[] args) { double n1 = -4.5, n2 = 3.9,…

Read more »

Java Program to find factorial of a number

Post Views: 0 Example : Find Factorial of a number using for loop The Aim of the program is to find the factorial of a number using for loop. We…

Read more »
java Even Odd

Java Program to check number is Even or Odd

Post Views: 0 Example: Check whether a number is even or odd using if…else statement The Aim of the program is to accept a number from the user and check…

Read more »