Reviewing concepts and taking notes on Java primitives data types casting and memory usage

Reviewing concepts and taking notes on Java primitives data types casting and memory usage


No alt text provided for this image


Primitives data types size



Primitives data types casting

No alt text provided for this image

Variable assignment

public static void main(String[] args){

  int firstValue = 9;
  
  int secondValue = 5;
  
  System.out.println(firsValue); // Prints 9

  firstValue = secondValue;
  
  System.out.println(firstValue); // Prints 5
  
  secondValue = 11;

  System.out.println(firstValue); // Prints 5

}        

Note: Java doesn't pass pointers to the variable assignment, instead, it passes just the value during assignment.

To view or add a comment, sign in

More articles by Alejandro Senges

  • Postmortem Document

    A postmortem is a process intended to help you learn from past incidents during the software development cycle. It…

  • What happens when you type google.com in your browser and press Enter

    When you type www.google.

  • Internet of Things (IoT)

    IoT The Internet of Things, also known as IoT, describes the network of physical objects (things) that are embedded…

  • Python3: Mutable, Immutable... everything is object!

    Introduction When talking about Python, every single data type, Built-in or User-defined, is an object. Objects has its…

  • How to renew a GoDaddy SSL certificate with AWS Lightsail

    This is a simple but powerful 3 steps "how to" to install your renewed Godaddy certificate on AWS Lightsail. Before you…

    1 Comment
  • Static or Shared (dynamic) libraries?

    When it comes to C programming, it is really important to choose the right approach. One of the most faced problems in…

  • C static libraries

    A static library is a collection of object files that allows users to link it to their own programs without having to…

  • gcc steps for c programs compilation

    By convention, C source files are named with .c extension and we use the command “gcc” to compile C source files.

    1 Comment

Insights from the community

Others also viewed

Explore topics