A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Refactoring for Software Design Smells: Managing Technical Debt
this week in the
OO, Patterns, UML and Refactoring
Programmer Certification (SCJP/OCPJP)
setting int to null
Joined: Jul 30, 2010
Oct 14, 2011 03:49:10
I just came across an interesting (at least for me) one that i would like to share.
This obviously won't compile:
int a = null;
But this will, as the null will be boxed to Integer, and you will get.. Of course,
int a = (true) ? null : 1;
OCPJP 6, OCEWCD 6
Joined: Nov 18, 2006
Oct 14, 2011 18:46:25
Wow, that's amazing. It must be auto-boxing the result, but I would have sworn it wouldn't have compiled!
(I got a
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: setting int to null
Problem in Arrays passing.
Values of Hash Map to be 2-dimensional array
exception while running code
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015