#4 | Java integer variables | Java tutorial for beginners

Опубликовано: 29 Апрель 2026
на канале: Neil Gillies | Coding & Music
447
8

This video shows you how to get started with some very simple variables (Integers). Variables allow you to manage the data used in your code. Here is the code used in this video:

public class Main {
public static void main(String[] args) {
// declare first number
int firstNum = 14;

// declare second number
int secondNum = 21;

// declare result variable and multiply values
int result = (firstNum * secondNum);

// display the result to the console
System.out.println("The result was: " + result);
}
}