Simple core java examples