so I have task to double number of letter “a” every time it occurs in a string. For example sentence “a cat walked on the road” , at the end must be “aa caaaat waaaaaaaalked on the roaaaaaaaaaaaaaaaa” . I had something like this on my mind but it doubles every charachter, not only “a”. Answer You need to check
Tag: character
How to print sequence of characters according to the number next to it?
Input: a2b4c3 Output: aabbbbccc Here is my code………which has wrong output: import java.lang.*; import java.util.ArrayList; class hi { public static void main(String[] args) { String a=”…
How to determine if a String has non-alphanumeric characters?
I need a method that can tell me if a String has non alphanumeric characters. For example if the String is “abcdef?” or “abcdefà”, the method must return true.
Creating Unicode character from its number
I want to display a Unicode character in Java. If I do this, it works just fine: String symbol = “u2202”; symbol is equal to “∂”. That’s what I want. The problem is that I know the Unicode …