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

August 2025

S M T W T F S
      12
3456789
10 11 12 13141516
17181920212223
24252627282930
31      

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 19th, 2025 03:25 pm
Powered by Dreamwidth Studios