Modules
ReverseEncoder
- Path
- pkg15modules/spi-demo/src/main/java/pkg15modules/spi/ReverseEncoder.java
- Package
- pkg15modules
- Study order
- 0
- Run
- Read this file. It has no standalone main method.
There is no in-browser runner. This is the file from the curriculum, unchanged.
1package pkg15modules.spi;2 3public class ReverseEncoder implements Encoder {4 public String encode(String s) { return new StringBuilder(s).reverse().toString(); }5 public String name() { return "reverse"; }6}