Skip to content

SiamBytes/JavaPractice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Java Practice – String Reversal Programs

This repository contains simple Java programs demonstrating string manipulation techniques such as reversing a string with and without preserving spaces. These examples are great for practicing Java fundamentals and interview preparation.


πŸ“˜ Programs Included

1. ReverseString.java

Reverses a string normally, without using the built-in reverse() method.

Example: Input: I miss you Output: uoy ssim I


2. ReverseStringPreserveSpaces.java

Reverses a string while keeping the spaces in their original positions.

Example: Input: I am QA Tester Output: r etseT AQ ma I


βš™οΈ How to Run

  1. Open any IDE (Eclipse, IntelliJ, VS Code) or terminal.
  2. Navigate to your project directory: cd src/com/javapractice Compile the program:

javac ReverseString.java Run it: java ReverseString or for the second one: java ReverseStringPreserveSpaces

πŸ‘¨β€πŸ’» Author Siam Hossain (SiamBytes) πŸ“ Based in New York, USA πŸ’Ό Java | QA | SDET | Automation Enthusiast πŸ”— GitHub Profile

⭐ Support If you like this project, please ⭐ the repo β€” it motivates me to share more Java practice examples!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages