monotonehell
Dec 1st, 2009, 09:38 PM
Hello,
I normally develop in vb.net but for this one project I'm examining some decompiled java code to obtain hook-in points for another application I've been asked to write.
Most Java code I find I can follow as its syntax is fairly obvious, but this one line I don't understand the syntax...
JFrame localJFrame = (JFrame)localClientServices.getMainPane();
That is, I understand what it's achieving, but the bit that I don't understand is:
(JFrame)localClientServices.
I can't find any explanation in the Java tutorials as to what something in brackets before something else means, where you would use it, and what it can refer to.
Remember I'm interested in the syntax of this expression in general, and not the specifics of the example (I think it's something to do with interfaces and types?).
I've been reading Java tutorials all morning, any help and pointers will be appreciated.
I normally develop in vb.net but for this one project I'm examining some decompiled java code to obtain hook-in points for another application I've been asked to write.
Most Java code I find I can follow as its syntax is fairly obvious, but this one line I don't understand the syntax...
JFrame localJFrame = (JFrame)localClientServices.getMainPane();
That is, I understand what it's achieving, but the bit that I don't understand is:
(JFrame)localClientServices.
I can't find any explanation in the Java tutorials as to what something in brackets before something else means, where you would use it, and what it can refer to.
Remember I'm interested in the syntax of this expression in general, and not the specifics of the example (I think it's something to do with interfaces and types?).
I've been reading Java tutorials all morning, any help and pointers will be appreciated.