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

  • highest salary employee
  • Find the duplicate elements from a list in java
  • Reverse a string in java
  • How does Spring Boot decide the order of auto-configurations?
  • Why does @Value sometimes fail to inject properties?

Recent Comments

No comments to show.