## Java Program to Reverse a Number without using Recursion

This is the Java Program to Reverse a Given Number Without Using Recursion. Problem Description Write a Java Program to Reverse a Given Number Without Using Recursion. Problem Solution Using a loop, extract the last digit of the number and add it at the end of the reverse formed till now. . Program/Source Code Here … Read more

## Java Program to Perform Arithmetic Operations

This is a Java Program to Calculate the Sum, Multiplication, Division and Subtraction of Two Numbers. Enter any two integers as input. Now choose from the given options to perform various operations on given integers. Here is the source code of the Java Program to Calculate the Sum, Multiplication, Division and Subtraction of Two Numbers. … Read more

## Java Program without using the Main() Function

This is a Java Program to Print any Statement Without Using the Main Method. We put the statement to be printed in a static block. The static block executes before main method hence we get the desired output. But in case of JDK7 the code would not execute as it looks for main method before … Read more

## Java Program to Extract Last Two Digits of a Given Year

This is a Java Program to Extract Last two Digits of a given Year. Enter any integer as input. After that we perform modulus and division operations to extract last two digits of the given integer as output. Here is the source code of the Java Program to Extract Last two Digits of a given … Read more

## Java Program to Shutdown Computer in Linux

This is a Java Program to Shutdown or Turn Off the Computer in Linux. We first check the name of the operating system of the computer. If its Linux we proceed else we would not. Now we would give number of seconds as input after which we want to turn off computer and then concatenate … Read more

## Java Program to Extract Digits from a Given Number

This is a Java Program to Extract Digits from A Given Integer. Enter any integer as input. After that we perform several operations like modulus and division to know the number of digits in given integer and then print each of the digits of the given number. Here is the source code of the Java … Read more

## Java Program to use Underscores in Numeric Literal

This is a Java Program to Use Underscores in Numeric Literal. A literal is an explicit value. For example : int number=123; The value 123 is a literal. Since it’s a normal base-10 value, we might say it is a decimal literal. We have used underscore at various positions in different types of datatype values … Read more

## Java Program to Check Whether a Number is Palindrome or Not

Problem Description Write a Java Program to check whether a given number is Palindrome or not. What is Palindrome in Java? A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward or forward. Examples: 272, 515, 71417. Problem Solution 1. Enter the number as an input. 2. Reverse … Read more

## Java Program to Illustrate use of Binary Literals

This is a Java Program to Illustrate Use of Binary Literals.A literal is an explicit value. To specify a binary literal, add the prefix 0b or 0B to the number. For example : int number=123; The value 123 is a literal. Since it’s a normal base-10 value, we might say it is a decimal literal. … Read more