This chapter was all about variable types and their functions. It helped to distinguish between objects and classes. I learned that Java reads all the class definitions before executing public static void main. The four integer variables are byte, short, int, and long. They can hold 8 bits, 16 bits, 32 bits, and 64 bits, respectively. They're all used for numerical values, but each are used depending on the size of the value. An important thing to note is that a good analogy for these numeric variables are different sized cups. You can redefine smaller values that fit into smaller types as bigger types, like how you can pour something from a small cup into a larger cup. an arry is like a tray of these cups. an array is like a remote control to the objects. this way they can control diffrent kinds of intigers.
No comments:
Post a Comment