What is null in java

0 votes
What does it mean?
Jul 17, 2018 in Java by Akrati
• 960 points
941 views

2 answers to this question.

0 votes

In java, a variable is a reference to an object. A null value thus indicates an unset reference (i.e. a reference to nothing). You can see variables as containers(*), inside which you can put an object of a given type, when the variable is null, it means your container is empty.

answered Jul 17, 2018 by Daisy
• 8,140 points
0 votes

"null" is a reference type and its value is the only reference value which doesn't refer to any object. There is no representation of null in memory. The binary value of a reference-typed variable whose value is null is simply zero. Even though this is not explicitly specified, it follows from the general initialization semantics of objects and any other value would cause major problems to an implementation

answered Jul 31, 2018 by Mrunal
• 680 points

Related Questions In Java

0 votes
2 answers

What is the difference between Set and List in java?

List is an ordered sequence of elements. ...READ MORE

answered Apr 26, 2018 in Java by Akrati
• 3,190 points
63,360 views
0 votes
2 answers

What is the use of @Override annotation in Java ? When do we use it ?

@Override annotation is used when we override ...READ MORE

answered Aug 14, 2019 in Java by Sirajul
• 59,230 points
3,471 views
0 votes
1 answer

What is the concept of Immutability for strings in Java ? Why are strings immutable ?

According to Effective Java, chapter 4, page 73, ...READ MORE

answered May 11, 2018 in Java by Rishabh
• 3,620 points
1,601 views
0 votes
1 answer

What is the 'instanceof' operator used for in Java?

It's an operator that returns true if ...READ MORE

answered May 23, 2018 in Java by Rishabh
• 3,620 points
1,067 views
0 votes
1 answer

Avoiding NullPointerException in Java

This to me sounds like a reasonably ...READ MORE

answered Dec 21, 2020 in Java by Gitika
• 65,770 points

edited Nov 13 by Khan Sarfaraz 598 views
+5 votes
4 answers

How to execute a python file with few arguments in java?

You can use Java Runtime.exec() to run python script, ...READ MORE

answered Mar 27, 2018 in Java by DragonLord999
• 8,450 points

edited Nov 7, 2018 by Omkar 81,223 views
+1 vote
1 answer

How to handle drop downs using Selenium WebDriver in Java

First, find an XPath which will return ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,500 points
8,359 views
0 votes
1 answer

What are the differences between getText() and getAttribute() functions in Selenium WebDriver?

See, both are used to retrieve something ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,500 points
17,433 views
+1 vote
3 answers

What is the syntax to declare and initialize an array in java?

You can use this method: String[] strs = ...READ MORE

answered Jul 25, 2018 in Java by samarth295
• 2,220 points
3,578 views
0 votes
2 answers

What is the use of toString method in Java and how can I use it ?

Whenever you require to explore the constructor ...READ MORE

answered Aug 23, 2018 in Java by Daisy
• 8,140 points
4,103 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP