Question: * Q2: [15 marks ] * implement reverse method in Q2 class to reverse a string with stack. For example, string wonderful will return lufrednow.

* Q2: [15 marks ] * implement reverse method in Q2 class to reverse a string with stack. For example, string "wonderful" will return "lufrednow". * NOTE: reverse without using a stack will result in @ for this question. *****/ String word "wonderful"; System.out.println("Q2 = [15 marks] System.out.println(Q2.reverse(word)); class 02 { public static String reverse(String word) { //TODO return ""; } B
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
