Results 1 to 4 of 4

Thread: [Resolved] Can you identify and explain this syntax?

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2008
    Posts
    18

    Question [Resolved] Can you identify and explain this syntax?

    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...
    Code:
    JFrame localJFrame = (JFrame)localClientServices.getMainPane();
    That is, I understand what it's achieving, but the bit that I don't understand is:
    Code:
    (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.
    Last edited by monotonehell; Dec 1st, 2009 at 11:44 PM. Reason: I seem to answer my own questions a lot... ;)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width