- Admin
- #1
- Joined
- Jul 9, 2006
- Messages
- 6,904
- Reaction score
- 71
I've made a program to help in your responses
public class JMafier
{
public JMafier(String WhatTheySaid)
{
System.out.println(Reverse(WhatTheySaid));
}
public static void main(String[] args)
{
JMafier jm = new JMafier("This is an example of how to input what someone said and it being reversed in this revolutionary JMafier program");
}
private String Reverse(String input)
{
String output = "";
for (int i = input.length() - 1; i >= 0; i--)
{
output = output + input.charAt(i);
}
return output;
}
}
(Result of running with the current input
margorp reifaMJ yranoitulover siht ni desrever gnieb ti dna dias enoemos tahw tupni ot woh fo elpmaxe na si sihT
No need to thank me JM! ^_^
public class JMafier
{
public JMafier(String WhatTheySaid)
{
System.out.println(Reverse(WhatTheySaid));
}
public static void main(String[] args)
{
JMafier jm = new JMafier("This is an example of how to input what someone said and it being reversed in this revolutionary JMafier program");
}
private String Reverse(String input)
{
String output = "";
for (int i = input.length() - 1; i >= 0; i--)
{
output = output + input.charAt(i);
}
return output;
}
}
(Result of running with the current input
margorp reifaMJ yranoitulover siht ni desrever gnieb ti dna dias enoemos tahw tupni ot woh fo elpmaxe na si sihT
No need to thank me JM! ^_^