I've stuck ... Can somebody give me a hint ?
package pl.codegym.task.task19.task1911;
/*
Reader wrapper
*/
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.sql.SQLOutput;
public class Solution {
public static TestString testString = new TestString();
public static void main(String[] args) {
ByteArrayOutputStream bAOS = new ByteArrayOutputStream();
PrintStream stream = new PrintStream(bAOS);
PrintStream konsola = new PrintStream(System.out);
System.setOut(stream);
testString.printSomething();
String s = bAOS.toString().toUpperCase();
System.setOut(konsola);
System.out.println(s);
}
public static class TestString {
public void printSomething() {
System.out.println("To jest tekst na potrzeby testów");
}
}
}