This language bar is your friend. Select your favorite languages!

Idiom #157 Declare constant string

Initialize a constant planet with string value "Earth".

const planet = "Earth"
static final String planet = "Earth";
const
  planet = 'Earth';
Planet = 'Earth'
const PLANET: &'static str = "Earth";

Do you know the best way to do this in your language ?
New implementation...

Idiom created by

programming-idioms.org