Ruby program to create a hash collection

bookmark


students = {"101" => "Amit", "102" => "Arun", "103" => "Sumit"};

puts "Students are: ",students;

 


Output:

Students are: 
{"101"=>"Amit", "102"=>"Arun", "103"=>"Sumit"}