class Removal
{
public static void main(String args[])
{
String str1=new String("Rs. 30,000");
String str2=new String("30000");
String string1="";
//lets us first remove irrelevant data from str1
int ch; // This is used to typecast the character to integer value(ASCII value of a character).
for(int i=0;i<str1.length();i++)
{
ch=(int)str1.charAt(i);
if(ch<=57 && ch>=48) // 0 is represented as 48 and 9 is represented as 57 in ASCII
{
string1=string1+str1.charAt(i); // concatenation of number
}
}
// our final aim to compare
if(string1.equals(str2))
System.out.println("True");
else
System.out.println("False");
}
}