Navigation:  Appendix A: Jumping Into Smalltalk >

Methods

Previous pageReturn to chapter overviewNext page

Java

Smalltalk

class Room {

void book (DateTime start, DateTime end)
{
reservations.add (
new Reservation(start, end));
}
 
}

bookFrom: startTime to: endTime
reservations add:
(Reservation from: startTime to: endTime)