Java Strings: Default values for String variables and String arrays

preview_player
Показать описание
Being able to trace how programs work by drawing memory models is super important!

Here we focus on the default value of String variables and String arrays.

public class JavaPractice {
public static void main(String[] args){
String str1 = new String("Team");
String str2;
String[] arr = new String[3];
arr[1] = new String("Hello");
arr[2] = str1;
}
}
Рекомендации по теме