Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Check Case
import java.util.regex.*; import java.lang.*; class Rextester { public static void main(String args[]) { String s="JimItBhaTT"; char[] a=s.toCharArray(); int upper=0,lower=0; for(char i:a){ if(Pattern.matches("[A-Z]",Character.toString(i))){ upper++; }else if(Pattern.matches("[a-z]",Character.toString(i))){ lower++; } } System.out.println(upper*lower); } }
run
|
edit
|
history
|
help
0
get top k frequent elements ( Priority Queue implementation ) Language: Editor: Layout:
Filter Iterator
JAVA # Klavyeden Girilen cümlelerin en uzununu bulma
hellojava.java
++a vs a++ and calculations around different variables
Count Islands
String reverse
heeeeell
Java - Swap two numbers without using temp var
inheritance