Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Selected Reading
Articles by kavan singh
1 articles
Can an int be null in Java?
No, In Java int cannot be null. There are some primitive data types and int is the one of the primitive data types in Java programming. The default value for an int data type is 0 and it cannot not be null. The different primitive data types have their different default values, but the objects in Java can be null. There is no null reference concept for the primitive data types (such as int, float, etc.). Example For example, if you try to assign null to an int variable. It will generate an error. int myInt = null; How ...
Read MoreShowing 1–1 of 1 articles
« Prev
1
Next »
Advertisements