Skip to content
  • Java
  • Spring Boot Tutorials
  • Microservices
  • System Design

Reverse a string in java

  • Post author:Nimai
  • Post published:February 22, 2026
  • Post category:Interview Question
  • Post comments:0 Comments

public class practice { public static void main(String[] args) { // TODO Auto-generated method stub String s="nima"; //reverse string String rev=""; for(int i=s.length()-1;i>=0;i--) { rev=rev+s.charAt(i); } } }

Continue ReadingReverse a string in java

Recent Posts

  • Liskov Substitution Principle (LSP) in Java Explained with Easy Examples
  • Interface Segregation Principle (ISP) in Java Explained with Easy Examples
  • Dependency Inversion Principle (DIP) in Java with Easy Examples
  • API Gateway in Spring Boot Microservices Explained Very Easily
  • Circuit Breaker in Spring Boot Microservices Explained Like You’re a Dog 🐶

Recent Comments

No comments to show.