online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
import java.util.Stack; public class Main { public static boolean isPalindrome(String text) { text = text.toLowerCase(); String text2 = text.replaceAll("[,. !?-]", ""); //replaceAll to remove unwanted characters String check = new StringBuilder(text2).reverse().toString(); //reverse string Stack<Character> stacktext = new Stack<>(); Stack<Character> stackcheck = new Stack<>(); for (int i = 0; i < text2.length(); i++) { stacktext.add(text2.charAt(i)); } for (int i = 0; i < check.length(); i++) { stackcheck.add(check.charAt(i)); } System.out.println(stackcheck); System.out.println(stacktext); return stackcheck.equals(stacktext); } public static void main(String[] args) { System.out.println(isPalindrome("Na, Fakir, Pprika-Fan?")); } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue