core java fundamentals examples