Skip to content
Advertisement

Tag: string

how to replace the vowels from a String with other vowels for encryption?

I’m doing an encryption app with 4 different methods of encryption, one of them is a vowel replace, the problem is that is not working and I’m not sure why, this is the vowelReplace class: } this is my interface: public interface StringEncrypter { } and the controller where I handle the input and selection of the encrypters: public class

How to centre-justify and format String in Java

I know that there are many previous explanations, but similar to my problem I did not find ! Simply i have a code to drow a bill info using graphics2d ! My Full Code IS : the output is like this : my problim is in this line : After i used a String.format it is must do the center

Index of first distinct character between two strings using a recursive method

I need to find the index of the first distinct character between two strings using a recursive method. Examples with expected outputs: rFirstDistinctPlace(“Little parcels”, “Little pretzels”) -> 8 rFirstDistinctPlace(“Gold shadow”, “gold shadow”) -> 0 rFirstDistinctPlace(“gold”, “golda”) -> 4 rFirstDistinctPlace(“gold”,”gold”) -> -1 Note: I can’t use the .equals() function The thing I’m struggling with is that I need to return -1

How do I change the distance between words?

How can I change the distance between words in a string in Android Studio using the methods? I need the distance to be about half the size of the standard space. as I understand it, after BackgroundColorSpan(Color.BLACK), you can add a parameter to change the distance between words. Answer There are different kinds of spaces with different widths: →󠀠← –

Advertisement