▶ Learn in 1 minute: Spring Programming

  • 19.11.2026 11:20:57
  • İbrahim Gökyar

We add behavior to the Person class after its fields: methods. We show that methods are either returning a value or not, how to define a method with an access modifier, return type and name, and write a void uyu() method. Then we liken a class to a blueprint, create a Test class with a main method that prints "Hello World", and produce our first Person object with new.

Sıfırdan Spring Boot series episode 3 is now on the Opendart Akademi YouTube channel. This series is prepared from the recorded lessons of our live Java Spring Boot course; we start from Java fundamentals and move toward Spring Boot.

▶ Watch the lesson on YouTubeAll episodes in the series

What's in this lesson?

  • 00:00 Introduction
  • 00:04 Reminder: Person class with String, int, double, boolean
  • 00:23 Methods are two kinds: returning and non-returning
  • 00:41 Method definition rule: access modifier, return type, method name
  • 01:44 void non-returning method: uyu()
  • 02:33 Printing to console with System.out.println
  • 03:29 A class is a blueprint: creating an object from the blueprint
  • 04:46 Creating the Test class with a main method
  • 05:47 What does public static void main do?
  • 06:22 Hello World and Run As > Java Application
  • 07:12 Using variables and methods of another class
  • 07:51 Rule for creating objects with new
  • 09:35 Assigning values to variables with dot (.)
  • 10:45 Calling a method: i.uyu()
  • 11:10 Calling methods in Java vs sending messages in Objective-C
  • 11:40 Closing

Opendart Akademi

Learn Spring Boot with an instructor in live lessons

These videos are from the recorded lessons of our Java Spring Boot course. The full course covers Java, Spring Boot, REST API, databases and real projects; you can ask the instructor when you get stuck.

View the course →Free consultation: WhatsApp

← Previous episode: Variables and Data Types in Java: String, int, double, boolean · Playlist: Sıfırdan Spring Boot · Subscribe on YouTube

Instructor: İbrahim Gökyar (Opendart Akademi)

📚 Learn this topic with Opendart: Java Spring Boot FullStack Training · YouTube video lessons · Subscribe