11 Primitive vs Reference Types

preview_player
Показать описание


Join our Developer Hub for beginner-friendly coding support, collaborative learning, and networking opportunities! Connect with fellow developers and grow your skills together.
Рекомендации по теме
Комментарии
Автор

Code in this video

Code 1

public class Video11a {
public static void main(String[] args) {
byte x = 1;
byte y = x;

System.out.println(y);
}
}

Code 2

import java.awt.*;

public class Video11b {
public static void main(String[] args) {
Point point1 = new Point(1, 1);
Point point2 = point1;

point1.x = 2;

System.out.println(point2);
}
}

clouds