I find myself unable to Google for gets in other languages. That is, because every language seems to call "take a line of input interactively from the keyboard and return it" a slightly different thing.
Ruby
foobar = gets
Python
foobar = raw_input()
See Python Standard Library Documentation ยง2
Java
Use java.io.Console.