null
例子:
String content = "It is a beautiful day.";
String[] results; // 申请一个空的字符串
results = match(content, "orange");
//上面的匹配语句将无法在字符串“内容”中找到“橙色”,
// 因此它将返回一个空值到“result”。
if (results == null) {
println("Value of 'results' is null.");
} else {
println("Value of 'results' is not null!");
}
描述:
用于表示目标的特殊值不是有效的数据元素。 在处理中,当尝试访问不存在的数据时,您可以在关键字null中运行。
- 本文固定链接: http://iprocessing.cn/2017/06/30/null空,不是有效数据/
- 转载请注明: 卡萨布兰卡 于 Processing编程艺术 发表