berry120

United Kingdom

berry120.blogspot.com

Age: 25

I'm an avid programmer, enjoy creating things, enjoy a good puzzle and especially enjoy foxing people with a Java puzzle now and again!

Outside of my coding life, I have a number of other interests, including outdoors activities such as hiking / geocaching / letterboxing. I'm also fond of music - I enjoy listening to it as well as playing the piano and violin.

14h
awarded Enlightened
15h
awarded Nice Answer
2d
comment When do I have to downcast something?
@greenapps Why would you not call that downcasting? Either way, that's just what it's called :-)
2d
comment When do I have to downcast something?
@greenapps Well, upcasting is changing to a more general type, downcasting is changing to a more specific type. Manual casts however are only needed for downcasting, since that's where things have the potential to cause problems (if I upcast a dog to a mammal, all dogs are mammals, so that will always work. However, if I downcast a mammal to a dog, not all mammals are dogs, so I could potentially end up with an invalid type.)
2d
comment When do I have to downcast something?
@greenapps In Java land it tends to be just called "casting", and is always used when you want to assert a more specific type on an object.
2d
revised When do I have to downcast something?
edited tags
2d
answered When do I have to downcast something?
Sep
12
awarded Popular Question
Sep
12
answered Why isn't java.io.Bits public?
Sep
10
comment Integer.parseInt("9999999990");
@JoachimIsaksson Doh. Mistype, sorry.
Sep
10
answered Integer.parseInt("9999999990");
Sep
8
comment Translate Windows System Error Codes in Java
Not without using JNI / JNA (at least not that I'm aware of.) Can't you just call the relevant DLL function using JNA? (I'm assuming that portability isn't a requirement considering we're talking about Windows specific error codes.)
Sep
4
comment Playing file via smb protocol with vlcj
Have you tried opening the same string with VLC (rather than programmatically with VLCJ?) It may be a VLC issue rather than VLCJ specific.
Sep
3
awarded Popular Question
Sep
3
awarded Nice Question
Aug
30
awarded Popular Question
Aug
27
awarded Notable Question
Aug
23
awarded Notable Question
Aug
20
accepted Give a symbol an alphabetical "order"?
Aug
20
comment Give a symbol an alphabetical "order"?
@NicolaTalbot Thanks, that did the trick! If you post as an answer I'll accept it.
1 2 3 4 5