Java Program to Reverse a Given 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

advertisement

Java Program to Find Season Using Switch Statement

This is a Java Program to Find Season Using Switch Statement. The switch statement is Java’s multi way branch statement. It provides an easy way to dispatch execution to different parts of your code based on the value of an expression. We take the month as an input. The value of the input is compared … Read more

advertisement

Java Program to Illustrate Use of Final Keyword

This is a Java Program to Illustrate Use of Final Keyword. We have declared the length and breadth variable as final and hence its value cannot be changed now. We have made the area and rect method final so now these methods cannot be overrided. Also we have made the class containing main method as … Read more

advertisement

Java Program to Illustrate the Use of Arithmetic Operators

This is a Java Program to Illustrate the Use of Arithmetic Operators. Enter two integers as input. After that we use switch case to choose from different arithmetic operations like addition, subtraction, multiplication, division and modulus to get the desired output. Here is the source code of the Java Program to Illustrate the Use of … Read more

advertisement

Java Program to Convert Integer Values into Byte, Character, Float

This is a Java Program to Convert Integer Values into Byte, Character, Float. Enter any integer as input. After that we convert the given integer into byte and char by type casting (Explicit casting) but we can directly convert int value to float value as java itself performs this type of type casting (Implicit casting). … Read more

advertisement

Java Program to Convert Long Values into Byte

This is a Java Program to Convert Long Values into Byte. Enter any long integer as an input. After that we convert the given long integer into byte using explicit type casting. Here is the source code of the Java Program to Convert Long Values into Byte. The Java program is successfully compiled and run … Read more

advertisement

Java Program to Perform String Concatenation

This is a Java Program to Perform String Concatenation. Enter any two strings as input. We have made a function into which we pass the two given strings and this function uses concatenation operator for string concatenation and hence return the desired string back to the main function. Here is the source code of the … Read more

advertisement

Java Program to Calculate Sum of Two Byte Values Using Type Casting

This is a Java Program to Calculate Sum of Two Byte Values Using Type Casting. Type casting in Java is to cast one type, a class or interface, into another type i.e. another class or interface. Enter any two byte values as input. After that we first convert these two bytes into integer using type … Read more

advertisement

Java Program to Illustrate Use of Pre and Post Increment and Decrement Operators

This is a Java Program to Illustrate Use of Pre and Post Increment and Decrement Operators.The increment (++) operator increases its operand by one. The decrement (–) operator decreases its operand by one. Enter an integer as input. After that we perform the pre and post increment and decrement operators on the given integer and … Read more

advertisement

Java Program to Illustrate Use of Relational Operators

This is a Java Program to Illustrate Use of Relational Operators. The relational operators determine the relationship that one operand has to the other. Enter any two integers as input. After that we use various relational operators on these given integers and hence get the outputs accordingly. Here is the source code of the Java … Read more

advertisement
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn | Youtube | Instagram | Facebook | Twitter