public class Math { public static void compare(String A, String B) { int a; a= S.replaceAll("[^" + J + "]" , "").length(); String b = S.replaceAll("[^"+ J +"]", ""); System.out.println(a is +a); System.out.println(b is +b); } public static void main(String[] args) { // TODO Auto-generated method stub String A= "AHhB"; String B="CKDADEGEGAh"; Math.compare(J, S); }<pre lang="java">
[^abc]
a
b
c
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)