What are two kinds of variables?

1 answer

Answer

1233153

2026-05-09 13:41

+ Follow

Java
Java

There are two types of variables in Java:

• Primitives - A primitive variable can be one of eight types: char, boolean, byte, short, int, long, double, or float. Once a primitive has been declared, its primitive type can never change, although in most cases its value can change.

• Reference variables - A reference variable is used to refer to (or access) an object. A reference variable is declared to be of a specific type and that type can never be changed.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.