Frage im Vorstellungsgespräch bei IDZ Digital

Reverse the string

Antworten zu Vorstellungsgespräch

Anonym

30. Juli 2019

import java.util.*; public class Reverse { public static void main(String[] args) { System.out.println("Enter the word"); Scanner sc=new Scanner(System.in); String word=sc,nextLine(); String eeverse=""; for(int i=word.length()-1;i>=0;i--) { reverse=reverse+""+charAt(i); } System.out.println(reverse); } }

1

Anonym

30. Juli 2019

import java.util.*; public class Reverse { public static void main(String[] args) { System.out.println("Enter the word"); Scanner sc=new Scanner(System.in); String word=sc,nextLine(); String eeverse=""; for(int i=word.length()-1;i>=0;i--) { reverse=reverse+""+word.charAt(i); } System.out.println(reverse); } }

Anonym

21. Mai 2019

Java:- String reverse = new StringBuffer().reverse().toString() Sop(reverse) Remember you have take string input from user and assign to a variable then pass the variable to string buffer object Eg: reverse(a)