---
title: "What is the difference between undefined value and null value?"  
description: "What is the difference between undefined value and null value?"  
author: "James Smith"  
published: 2011-05-17  
updated: 2020-09-16  
canonical: https://www.mindstick.com/interview/927/what-is-the-difference-between-undefined-value-and-null-value  
category: "cold fusion"  
tags: ["cold fusion"]  
reading_time: 1 minute  

---

# What is the difference between undefined value and null value?

Undefined value having no keyword and not defined is known as undefined value. While declaring a variable it does not contain any value hence it is called as undefined value. Null value has to be specifically declared as null indicating that the variable doesn’t point at any particular location in memory. For example String str = null; declares variable str which references null.

## Answers

### Answer by James Smith

Undefined value having no keyword and not defined is known as undefined value. While declaring a variable it does not contain any value hence it is called as undefined value. Null value has to be specifically declared as null indicating that the variable doesn’t point at any particular location in memory. For example String str = null; declares variable str which references null.


---

Original Source: https://www.mindstick.com/interview/927/what-is-the-difference-between-undefined-value-and-null-value

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
