Hi there.
I was trying some code on java exception handling. I expected it to throw an error, but it returned the arguement.
What is going on?
public class Main{ public static void main(String[] args) throws Exception { squarePrinter("I am square"); } public static <Square> void squarePrinter(Square squareObject){ try { System.out.print(squareObject); } catch (IllegalStateException e) { System.out.println("You cannot print a Java object to the terminal: " + e); } } }