본문 바로가기
(Pre-class)

What is the Variables?

by coramdeo643 2025. 3. 24.

package ch01:

// multiple line footnote

/ **

 * What is the variables?

 * variable numbers(variable data)

 * memory space(box) containing the data(value)

 */

public class Variable {

 // start of the main

 public static void main(String[] args) {

  // Three types of using the variables

  // int <-- 

  // 1. Declaring a variable

  int ageBox; // Box containing numbers

  int telBox; // variable named telBox

  // 2. Assign a value to a variable

  ageBox = 30;

  // 3. Use the variable

  System.out.println(ageBox);

  // 4. Update a variable's value

  ageBox = 100;

  System.out.println(ageBox);

  // Conclusion : variable(data), Box able to contain the value(memory space)

 } // end of main

} // end of class

'(Pre-class)' 카테고리의 다른 글

What is the Data Type and Integer?  (0) 2025.03.25
How to setup Eclipse IDE?  (0) 2025.03.25
What is the OOP?  (0) 2025.03.24
How to install the Eclipse?  (0) 2025.03.24
How to install the JDK?  (0) 2025.03.24