DEV Community

Princy Jayakodi
Princy Jayakodi

Posted on

Java training session : attempt 3rd!!

Java Class Vlog – Session 3

Hey everyone! πŸ‘‹ Welcome to my Java learning journey. Today was our third session of Java class, and trust me, it’s getting really exciting! Let me take you through what we learned today!!


Starting the Class

Our trainer kicked things off by asking us what we remembered from the last two sessions. A quick recap of Java basics and then we jumped straight into today’s topics: Classes, Keywords, Variables, and Methods.


Topic 1: What is a Class?

The teacher explained that a class is like a blueprint. It’s not the actual object but a plan for making one. Example? Think of a mobile phone model – the design is the class, but the actual phone in your hand is the object.

We also saw the syntax:

public class Classname {
// variables
// methods
}

I found it super cool that once you define a class, you can create as many objects as you want from it.


πŸ“Œ Topic 2: Keywords

Then we talked about keywords. These are reserved words in Java that you cannot use as names. For example: class, public, static, void, etc.

Our teacher joked, β€œIf Java was a city, keywords are the traffic rules you can’t break.”


πŸ“Œ Topic 3: Variables and Their Types

Next up: Variables! These are like containers that hold values. We wrote a few examples like:

int age = 20;
String name = "John";

We also learned about the three types of variables:

Local Variable β†’ Lives inside a method.

Instance Variable β†’ Belongs to each object.

This part made me realize how powerful Java is in handling data.


πŸ“Œ Topic 4: Methods

Finally, we learned about methods – blocks of code that perform actions. There are four types:

  1. Without return type

  2. With return type

  3. Without argument

  4. With arguments

We even practiced writing a few of them. It felt like I was giving instructions to the computer and it actually followed them – so satisfying!


🎯 End of the Session

The class wrapped up with a quick summary. I left the session feeling more confident – Java is starting to make sense now!!

Top comments (0)