Let’s see how we can do some basic operations with strings with 2 languages, starting with how we declare a string variable. This is Ruby vs Java!
|
1 2 |
Ruby: my_string = "Playing with strings" Java: String my_string = "Playing with strings" |
As you may know Java is a strong typed language, which means you need to declare the variable type, Ruby infers the type from the contents. – […]
