Java Program to Print Semicolon without using Semicolon

This is a Java Program to Print a Semicolon without using a Semicolon anywhere in the Code. We take a integer variable and assign it a value of fifty nine. Now with the help Implicit Casting we convert this integer value into char and since ASCII value of semicolon(;) is fifty nine we get the … Read more

advertisement

Java Program to Get IP Address

This is a Java Program to Display the IP Address of the System. InetAddress class represents an Internet Protocol (IP) address. We use the method named getHostAddress() of this class to get the IP address string in textual presentation. Here is the source code of the Java Program to Display the IP Address of the … Read more

advertisement

Java Program to Print Statement without Semicolon

This is a Java Program to Print any Statement without using Semicolon. We use statements like if and for to print any statement without using semicolon. Since these statements do not require semicolons at the end of these statements, we use them to get desired output. Here is the source code of the Java Program … Read more

advertisement

Java Program to Display the ATM Transaction

This is a Java Program to Display the ATM Transaction. The user will choose from any one of the available options as input. Different cases using switch case have been provided for different operations like withdraw, deposit and check balance. Here is the source code of the Java Program to Display the ATM Transaction. The … Read more

advertisement

Java Program to Check Whether a Given Year is a Leap Year

Leap Year Program in Java: A year is a Leap Year if it satisfies the following conditions: The year is exactly divisible by 400 (such as 2000,2400) or, The year is exactly divisible by 4 (such as 2008, 2012, 2016) and not a multiple of 100 (such as 1900, 2100, 2200). Problem Description Write a … Read more

advertisement

Java Program to Find the Number of Integers Divisible by 5

This is a Java Program to Check Whether Given Number is Divisible by 5. Enter any integer as an input. We use modulus operation to check the divisiblity of given integer by 5. If the given integer gives zero as remainder when divided by 5 then it is divisible by 5 or else its not … Read more

advertisement

Java Program to Reverse a Number and Find its Sum using do-while Loop

This is a Java Program to Reverse a Number and find the Sum of its Digits Using do-while Loop. Enter any integer as an input. After that we use operations like modulus and division to reverse a number and find sum of its digits along with the help of do-while loop. Here is the source … Read more

advertisement

Java Program to Print Multiplication Table

This is a Java Program to Print Multiplication Table for any Number. Enter any integer number as input of which you want multiplication table. After that we use for loop from one to ten to generate multiplication of that number. Here is the source code of the Java Program to Print Multiplication Table for any … Read more

advertisement

Java Program to Take a Number and Return List of its Digits

This is a Java Program to Take a Number and Return List of its Digits. Enter any integer number as an input. After that we count the number of digits in the given input. The given number along with length of that number is passed to the other function where by using modulus and division … Read more

advertisement

Java Program to Read a Grade and Display the Equivalent Description

This is a Java Program to Read a Grade & Display the Equivalent Description. Enter the grade of student as input. After that we match the character grade of student against the given cases using equal to operator (==) and hence generate the desired output. Here is the source code of the Java Program to … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.