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

  • Reverse a string in java
  • How does Spring Boot decide the order of auto-configurations?
  • Why does @Value sometimes fail to inject properties?
  • What happens if @PostConstruct throws an exception?
  • How do you detect bean initialization issues in large applications?

Recent Comments

No comments to show.