juan_gandhi: (VP)
  @Test public void null_is_null() {
    Double Null = ((Double)null);
    boolean itis = Null instanceof Double;
    assertTrue(itis);
  }


Comments? I'm pretty much lost here.
juan_gandhi: (VP)
scala> class A[T] { var x:T = _ }
defined class A

scala> val aInt = new A[Int]
aInt: A[Int] = A@36f6e879

scala> aInt.x
res2: Int = 0

  Until you take a closer look:

scala> class A[T] { var x:T = _; println(x) }
defined class A

scala> val aInt = new A[Int]
null
aInt: A[Int] = A@3fee9989

scala> aInt.x
res3: Int = 0


null magically turns into 0.
juan_gandhi: (VP)
In the code I'm working with.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

October 2025

S M T W T F S
    1 23 4
5 678 9 1011
12 13 1415 161718
1920 2122 23 2425
26 2728 293031 

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 30th, 2025 03:26 pm
Powered by Dreamwidth Studios