Novice Java Tutorial with Apache NetBeans 11.0: 7 Declaring and Assigning Primitive Type

Опубликовано: 24 Май 2026
на канале: Bruce Lamb
21
0

Declare and Assign primitive type variables.
To copy and paste code visit: www.carbon12.life/Tutorials/Novice_Java/7_Primitive_Type.php
Brief Summary of what was covered in the series so far. (0:00)

Examine the official documentation of Primitive Data Types. (0:30)
Java Doc: https://docs.oracle.com/javase/tutori...
There are 8 primitive data types in Java and 2 will be used as examples to demonstrate how to declare and assign values to the variables. (0:42)
Declare a char type variable and name it "var". (1:13)
Assign the value 'W' to the variable "var". (1:44)
Add a println program statement to print the value of the variable to the screen. (2:42)
Execute program and explain all 3 lines of code. (2:48)
Change character type to a tab character and run program. (3:25)
Change variable type from char to int and change value to 7. (3:58)