I received this simple (I really thought it was!) challenge of creating a "tokenizer". I had to split string " O rato roeu a roupa do rei de roma " into spaces. So, after a long time, I developed the following algori...
$comoesta = "{A,O} {portador,portadora} é o mais {especializada,especializado} para o serviço .";
If it's masculine:
$comodeveficar = "O portador é o mais especializado para o serviço ";
If it's feminine:
$comodeveficar = "A portadora...
How many String s does the JVM actually create during the runtime of the code snippets below?
1 :
String s1 = "s1";
2 :
String s2 = new String("s2");
3 :
String s3 = "s3";
String s4 = s3 + "s4";
4 :
String s5 = "s5...
Java allows us to concatenate Strings in Java using just the '+' operator
String str = "a" + "b" + "c";
It's a simple way to do the job, and much less verbose than using StringBuilder.
But in cases of Loops like the one below, which appr...
I once heard about the C # SecureString class and found it interesting, so I think it's interesting content that can yield good answers from more experienced professionals.
Some questions to ask might be:
Someone has worked with this cla...
I was reading the documentation to properly develop a mask and save without it.
However, I came across this question about methods replace and replaceAll for my string .
What's the difference between the two, apparent...
I'm learning C # after already working with other languages, I noticed that some methods need to be called by the class
string.Concat("123","456")
I usually use it in other languages this way
"123".Concat("456")
Why can not you?
Can...
I wanted a program that checks the user and password, if it was correct to display a message, if it repeated the check and if the attempts were equal to 3, it showed the limit message of attempts reached.
#include <stdio.h>
#include <...
I need to separate the characters of a string into numbers and letters.
Ex:
Entry:
"A1B2C3D2Z9"
Output:
List<Character> numeros = { '1','2', '3' }
List<Character> letras = { 'A', 'B', 'C' }
I use a for to...