About final keyword

hai plz help me,
why the final methods are not allowing overriding?

Well, that's the easy answer; if you put final on a method declaration you're saying "this method cannot be overriden."
Why would you want to do that?
Security reasons - you might want to prevent an implementer from changing some kind of security checking method, for example.
Optimisation. When compiling a call to a final method the compiler may be able to determine exactly which method is to be called (early binding). With a non-final instance method the actual method to be called can be determined only at run time (late binding). So final may result in a slightly faster call.

Similar Messages

  • Shoukd the 'final' keyword should be used on all input parameters?

    In my very limited experience as a java programmer have never seen this done any where. Except in the java.lang.Math class which has a final variable, of type double, called PI. As pi is not a value that should change during the execution of a program, though this is not passed in as a parameter.
    However, on a new project, a co-worker is proposing the use of the 'final' keyword on all input parameters as a standard. He has about 5 years experience of maintaining java systems and is putting this suggestion forward as in the past people have overwritten values passed in as parameters causing confusion. Personally I don't see why this is such a major issue if one reads the code of the called programs.
    I would be grateful if anyone has seen this done before, or has any views on the advantages or disadvantages of this.
    Thanks in advance,
    LS

    Lord_Sidcup wrote:
    In my very limited experience as a java programmer have never seen this done any where. Except in the java.lang.Math class which has a final variable, of type double, called PI. As pi is not a value that should change during the execution of a program, though this is not passed in as a parameter.
    I'm sorry, but this point is irrelevant. There are lots of final fields (but not that many final parameters) in Java, BTW. Every field you declare in an interface is automatically final, for example.
    However, on a new project, a co-worker is proposing the use of the 'final' keyword on all input parameters as a standard. He has about 5 years experience of maintaining java systems and is putting this suggestion forward as in the past people have overwritten values passed in as parameters causing confusion. Personally I don't see why this is such a major issue if one reads the code of the called programs.
    IMHO, it's definately not a major issue. It is simply being restrictive, to be restrictive. The guy may have "five years experience", but he sounds lazy, to me. Besides, the first thing I would do in that case (if final were the default), would be something like this:
    public void myMethod (final String a, final int b) {
      String myA = a;
      String myB = b;
    }And now, what has he won by making it final? It simply added some up front work for some people, with no real added value. Also, if I had to retroactively change my code, I would change it as follows:
    //Original Code
    public void myMethod (String myA, int myB) {
      String myA = a;
      String myB = b;
    // New code
    public void myMethod (final String a, final int b) {
      String myA = a;
      String myB = b;
    }That way, you wouldn't even have to worry about changing anything else about your method, as the variables actually used in the rest of the body will remain the same.
    I would be grateful if anyone has seen this done before, or has any views on the advantages or disadvantages of this.The only thing declaring the parameter final does, is it prevents you from assigning a new value to the variable. The instance that parameter references (as long as it is not immutable to begin with) can still be manipulated. I.E. except in some very narrow, and specific, cases, no value added, simply a restriction that exists to be restrictive.
    >
    Thanks in advance,
    LSEdit: And man, am I slow and long-winded.

  • Use of final keyword on methods arguements ?

    Hi All,
    Just say I have an input arguement for a method which is an int. If I wanted to access the value stored by the input arguement reference inside an anonymous class that is contained in the method one way would be to pass the input arguement reference to a instance variable of the class that contains the method and use that.
    // Declared at start of  class
    int arrayIndex = 0;
    methodName(nt inputNumber)
        arrayIndex = inputNumber;
        ActionListener task = new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                // Accessing here
                anArray[arrayIndex] = 100;
    }Just wondering, I used the final keyword on the the input arguement instead and then used the input arguement directly instead. It seemed to work ok. Is this good programming practice or are there some pitfalls to using this that I'm not aware of?
    (I don't need to change what the input arguement reference points to)
    // Alternate
    methodName(final int inputNumber)
        ActionListener task = new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                // Accessing here
                anArray[inputNumber)] = 100;
    }Regards.

    declaring it final guarantees that you will not change the value.Of course it does. That's what it's for. That's what it means. But you're only guaranteeing that to yourself. It doesn't form part of the interface contract so it's no use to anybody else. Which is the bigger picture.
    Whenever i use any anonymous classes i prefer to use the final variables as long as i dont need to change their values.No you don't 'prefer' it, you are forced to do that by the compiler.

  • Purpose of Finally keyword?

    hi i just read this http://www.roseindia.net/help/java/e/finally-keyword.shtml but i still don't quite get the purpose or use
    of the finally keyword if it's executed no matter if the exception is thrown or not? like wat's the difference between just having a catch statement and code afterwards, and having using finally with the same code?
    thanks,
    newbie

    saru88 wrote:
    hi i just read this http://www.roseindia.net/help/java/e/finally-keyword.shtml but i still don't quite get the purpose or use
    That's probably because roseindia is a pretty bad site filled with half-truths, misinformed advice and straight out errors.
    Read [the official tutorial|http://java.sun.com/docs/books/tutorial/essential/exceptions/finally.html] instead.
    of the finally keyword if it's executed no matter if the exception is thrown or not?Yes.
    like wat's the difference between just having a catch statement and code afterwards, and having using finally with the same code?You can get almost the same effect as the finally block using this technique (almost, because you can't execute code after a "return;" this way, for example).
    It is harder however.
    Another important advantage of finally is that it is also executed when you don't catch the exception yourself (for example because you want it thrown further or you didn't expect that exception to happen).
    Finally is used for cleanup that needs to run, no matter if your try-block successfully completes or not.

  • Question about Final Cut Studio 3/Final Cut Pro 7

    Last year I bought Final Cut Studio 2 and got a student discount.
    I was thinking about upgrading to Final Cut Studio 3, but I saw a post that said you can't upgrade if you have the academic version. First of all, is this true, and secondly how can I tell if I have the academic version?
    If I can't upgrade, I can't afford to buy the whole package again. And surely I should have been informed of this! But can I edit a project on Final Cut Pro 6 and then work on it on Final Cut Studio 7, and back again? I presume not, but it's worth asking because I'm pretty much screwed if not and I can't get the upgrade.
    Thanks

    I want to upgrade because the macs at uni have upgraded, and I don't live near the uni I attend so it isn't practical for me to stay in their edit suites till late like everybody else does. I only bought the mac and final cut studio last year for this reason! So I prefer to edit from 2 machines: Mine, when I can, and the ones at uni when I'm collaborating with the 'crew'.
    However, I cannot see academic version written anywhere. And I know this is going to make me sound even more stupid than I already do, but I can't remember if I got the student discount on Final Cut, or whether it was just on the mac. Does anyone know where I should be looking. I've checked the 'about final cut pro' details and looked through the packaging (and my emails for the receipt) but I cannot see anything.
    Thanks

  • HT3258 what about final cut does not recognize mts file

    what about final cut does not recognize mts file

    If you have an AVCHD camcorder, you need to select one of the AVCHD Apple Intermediate Codec Easy Setups in FCE that matches how you shot the video in your camcorder.  (eg, AVCHD Apple Intermediate Codec 1920x1080i60 would be appropriate for camcorders produced for North America unless you selected some other video type in the camera's setup.)   After selecting the appropriate Easy Setup, create a new sequence then import the video from your camcorder.
    If you only have the .mts files themselves (perhaps because you copied them to your hard drive without their entire surrounding AVCHD folder structure), that's another matter.  In that case you need Clipwrap or similar app to transcode the .mts files to QuickTime/Apple Intermediate Codec before importing them into FCE.   You still need to have the correct easy setup in FCE.
    It would help to know exactly what make/model camcorder you have, and what model Mac and versions of OS X and QuickTime.

  • About Final Cut ProX: why a red line appears at the top o a file imported into a New Event? then when I restarted the Project that files comes as "Missed files" How can i fix it?

    About Final Cut ProX: why a red line appears at the top o a file imported into a New Event? then when I restarted the Project that files comes as "Missed files" How can i fix it? Thank you very much.

    Where are you importing from – a camera or computer? If you are optimizing at import, make sure the background processes are completed. (Command-9)
    Russ

  • Help needed understanding final keyword and  use 3

    Hi Everyone,
    I have been studying a book on multi-threading and have inadvertently come accross some code that I don't really understand. I am wondering if anybody can explain to me the following:
    1). What effect does using the final keyword have when instantiating objects, and
    2). How is it possible to instantiate an object from an interface?
    public class BothInMethod extends Object
         private String objID;
         public BothInMethod(String objID)
              this.objID = objID;
         public void doStuff(int val)
              print("entering doStuff()");
              int num = val * 2 + objID.length();
              print("in doStuff() - local variable num=" + num);
              // slow things down to make observations
              try{
                   Thread.sleep(2000);
              }catch(InterruptedException x){}
              print("leaving doStuff()");
         public void print(String msg)
              String threadName = Thread.currentThread().getName();
              System.out.println(threadName + ": " + msg);
         public static void main(String[] args)
              final BothInMethod bim = new BothInMethod("obj1");  //Use of final on objects?
              Runnable runA = new Runnable()      //Creating objects from an interface?
                   public void run()
                        bim.doStuff(3);
              Thread threadA = new Thread(runA, "threadA");
              threadA.start();
              try{
                   Thread.sleep(200);
              }catch(InterruptedException x){}
              Runnable runB = new Runnable()
                   public void run()
                        bim.doStuff(7);
              Thread threadB = new Thread(runB, "threadB");
              threadB.start();
    }If you know of any good tutorials that explain this (preferably URL's) then please let me know. Thanks heaps for your help.
    Regards
    Davo

    final BothInMethod bim = new BothInMethod("obj1");  //Use of final on objects?
    Runnable runA = new Runnable()      //Creating objects from an interface?          
         public void run()               
                                    bim.doStuff(3);               
    };Here final is the characteristics of bim reference variable and it is not the characteristics of class BothInMethod
    This means u cannot use bim to point to some other object of the same class
    i.e, u cannot do this
                       final BothInMethod bim = new BothInMethod("obj1"); 
                       bim  =  new   BothInMethod("obj2");  This bim is a constant reference variable which will point only to the object which it is initialized to
    and not to any other object of the same class later on.
    How is it possible to instantiate an object from an interface?Regarding this yes we cannot create an object from an interface but
    but here it is not an interface u are providing the implementation of the interface Runnable
    as
    new Runnable()
    }This now no longer stays an interface but now it is an object that implements the interface Runnable

  • Related with Final Keyword...

    Hi,
    I written the following code to iterate over an array :
    for(final int i:arr)
    System.out.println(i);
    }

    jschell wrote:
    I really doubt that the compiler doesn't erase the final part.
    It is a compile time rather than run time check.Runtime as well, it seems.
    public class Final {
      public static final int i = 999;
    public class FinalChanger {
      public static void main(String[] args) {
        Final.i = 123;
        System.out.println(Final.i);
    }1) Compile both without the final keyword in Final.java
    2) Put final into Final.java, and recompile.
    3) Run javac -cp . FinalChanger
    Exception in thread "main" java.lang.IllegalAccessError
            at FinalChanger.main(FinalChanger.java:3)
    :; javap -s -c -verbose -classpath . Final
    Compiled from "Final.java"
    public class Final extends java.lang.Object
      SourceFile: "Final.java"
      minor version: 0
      major version: 50
      Constant pool:
    const #1 = Method       #3.#14; //  java/lang/Object."<init>":()V
    const #2 = class        #15;    //  Final
    const #3 = class        #16;    //  java/lang/Object
    const #4 = Asciz        i;
    const #5 = Asciz        I;
    const #6 = Asciz        ConstantValue;
    const #7 = int  999;
    const #8 = Asciz        <init>;
    const #9 = Asciz        ()V;
    const #10 = Asciz       Code;
    const #11 = Asciz       LineNumberTable;
    const #12 = Asciz       SourceFile;
    const #13 = Asciz       Final.java;
    const #14 = NameAndType #8:#9;//  "<init>":()V
    const #15 = Asciz       Final;
    const #16 = Asciz       java/lang/Object;
    public static final int i;
      Signature: I
      Constant value: int 999
    public Final();
      Signature: ()V
      Code:
       Stack=1, Locals=1, Args_size=1
       0:   aload_0
       1:   invokespecial   #1; //Method java/lang/Object."<init>":()V
       4:   return
      LineNumberTable:
       line 1: 0
    :; javac -version
    javac 1.6.0_06
    :; java -version
    java version "1.6.0_06"
    Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
    Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode)

  • Static and final keyword questions

    Brief summary: I want to make the JButtons, JLabels, and JPanels public static final. Is that bad, and why? And what the heck is the Java system doing when it compiles and runs a program that does this? Is the code more efficient?
    More questions below.....
    I'm new to making GUI designs with Java. I am going to school and my teacher is making us do GUI interfaces in JAVA.
    Early on, I learned that constants are identifiers similar to variables except that they holda particular value for the duration of their existence. QUESTION ONE: what happens during run-time, how does JAVA handle this constant?
    I also learned that some methods may be invariant, as with a simple extension. These methods should be marked final. The subclass inherits both a madatory interface and a mandatory implementation. So I guess you use a final method when you want to model to a stric subtype relatinoship between two classes. All methods not marked final are fair game for re-implementation.
    Well, that's good and well. So then I started thinking about static. That's a keyword in Java and when used with a variable, it's shared among all instances of a class. There is only one copy of a static variable for all objects of a class. So then again, I noticed that the programs in my book that used final usually threw in the word static before it. Memory space for a static variable is established when the class that contains it is referenced for the first time in a program.
    Well, that too is great? Question 2: In my GUI programs, can I declare all the buttons (JButtons), labels (JLabels), panels (JPanels) as being final constant static?
    In the program I don't intend to change the type of button, or JPanel so why not make it a constant? As long as I'm doing it, why not make it static? WHAT IS ACTUALLY GOING ON THEN IN MY PROGRAM WHEN I DO THIS?
    Question 3: What goes on in JAVA when I make a method or function public static final. Is that what the Math class does? How is that handled during run-time? Is the code faster? Is it more efficient?
    Question 4: If I make a class final, that means a subclass cannot extend it? Or does it mean that a subclasss cannot change it? I know that if the function or method in the parent class was final, then the subclass inherits both a madatory interface and a mandatory implementation....So if the class is final, then what?

    You have a lot of questions..
    You make a method final if it should not be allowed for subclasses to override it.
    If you make a class final, you will not be able to subclass that class.
    A static method is a class method, i.e. you don't need to create an instance of the class to call the method.
    You can make any object and primitive final, but for objects, you are still able to modify what is inside the object (if there is anything you can and are allowed to modify), you just can't change the final reference to point to another object.
    When you make a variable final, you sometimes make them static as well if they should work like constants. Because there is no reason that every instance of the class has their own copy of constants.
    If you make everything static, why even bother to work with object-oriented programming. It gives you no reason to make instances of your classes. You should try not to make static variables and methods when there is no need for it. Just because you start from a static main method, it doesn't mean it is necessary to make all variables and methods static.
    Don't think so much about performance issues as long as you are still learning java. When you make a method final, it is possible for a compiler to inline that method from where you call the method, but you will hardly gain much in performance with that. In most cases it's better to optimize the code you have created yourself, e.g. look at the code you run inside loops and see if you can optimize that.

  • 2 Questions about final cut pro 5

    My first question is quite simple, I know that previously final cut pro could only use up to 2.5GBs of memory, now I'm just a bit curious if it can use more since leopard is a 64-bit OS. Right now I'm using Final Cut Studio 1. I'm just asking this question since I intend to get an additional 4GB of ram (Right now I only have 2GB) I'm going to get Muskin's MacPro memory. I generally run my system down to about 200MB of free memory and sometimes down to 10MB when I'm using photoshop in conjunction to FCP. What does everyone think about getting an additional 4GB?
    Thanks for the answers.
    Okay, to not make two posts I'm give me final question/Problem. Ever since I've upgraded to Leapord I noticed that the playback quality in the canvas and viewer is poor. There is bad gamma. What I mean by that is that i'm getting extremes in color, I have areas that look normal followed by areas of over saturated color. It's more on the over saturated side though. Besides that the play back quality is poor, even though my sequence settings are at "Best" for video processing. I also seem to get jagged lines on things like railings, people's shoulders, and on other edges. My picture quality is grainy, however there are no artifacts. Even on the FX transistions I get the jagged lines on edges of oh say page peels and what not.
    Now when using DVD player or watching my MPEG2's on DVD Studio, they play poorly too. The image is clear however I get the horizontal lines when there is motion. Now when I put one of my DVD's in my DVD player (not computer) the problem goes away and everything looks fine. This is less of a problem (the horizontal lines), but I don't understand the poor playback quality.
    The video looks fine on my external NTSC video monitor.
    I have the GeForce 7300 graphics card, with the 24" samsung 245BW. I upgraded to 10.5 on a clean install.
    Thanks a lot everyone!!

    Thanks for my memory question!
    However I'm still getting poor looking footage. Even when I open up my source clips and play them they look poor in quality. I'm getting the horizontal lines on everything that moves and corners are not sharp, they look distorted and jagged. I never had this problem before I'm not sure whats the cause or the solution. Even the footage from Final Cut Studio's tutorial looks bad (grainy, strange contrast, jagged corners and lots of horizontal lines). However the edges on my footage look a little more jagged. I think i mentioned it already but the FX transitions that are page peels, cube spins...etc give me jagged edges too.
    I removed flip4mac and all other non-apple codecs too.
    ugh i hate computers sometimes
    -Tom

  • Question about adding keywords to a group of images in Aperture

    Hi all,
    Not sure what I am doing incorrectly, but I am unable to add a keyword to more than 1 image at a time, even though a group of images is selected. So, for example, in Browser view, with 4 images selected, using the keyword HUD, I drag a keyword to one of the selected images, and only the one dragged to gets that keyword, not the others in the group.
    Any ideas?
    Thanks
    Aperture 3.1.1

    Hi Pi,
    Not quite sure what the purpose of that button is.
    You'll laugh about this sometime not too long from now. Sometime, you will have a bunch of photos selected and *not want to change your selection*, but you'll notice that you need to add some metadata or adjust just 1 of those pictures. That's when you use the "primary only". When you find yourself in that situation, it'll be like a "eureka" since you're currently wondering what it's all about.
    nathan

  • What's annoying about Events, Keyword Collections & Move to trash

    Today I was given a project to edit where the Event was already created, the media was optimized, keywords added and keyword collections created to split the media into folders. All I had to do was to sync the 2x cam's to separately recorded audio, and begin grabbing sound bites.
    Nothing unusual so far....
    To start my syncing, I began by finding all the clips from CAM-A and added the keyword SYNC 1 (CAM-A). I also added the separately recorded audio file within this keyword collection. Clicking on the SYNC 1 (CAM-A) keyword collection icon, I highlighted all the clips, right-clicked and chose Syncronize Clips.
    This is what I find annoying: When I choose Syncronize Clips, The synchronized compound clip doesn't automatically appear in my SYNC 1 (CAM-A) keyword collection folder, instead I need to click on the event and add the keyword for it to appeare in that keyword collection. Wouldn't one think that if I chose to create a Syncronized Clip in that keyword collection that FCPX knows thats where I want it to appear...!
    Anyway so in this particular case not all the clips synced, so what I then did was chose the un-synced clip + the audio clip and synced them alone. As i synced these clip separatley, what I was doing was moving the already synced clip to the trash, totally forgetting that these were also being deleted from my main event folder. Boy was I "P***'S'd"
    Again what I found annoying: if you move a clip to the trash in a keyword collection, you actually delete that from the event too. Persionally I'd like to see an option so that you can righ-click and delete a keyword rather than having to twirl down the triangle,  double clicking the keywords to activate the keyword editor, which you then have to select the keyword and hit delete to remove it out of that keyword collection.
    If for arguments sake a clip wouldn't sync, what I then did was find a small snippet of the same audio. I would make a range selection and add a keyword to both the clip and the audio file.
    What I also found annoying: when you open the Syncronized Compound Clip, your unable to stretch the clip to the left, instead I needed to use my "P" tool to move the clip to the right, which then gave me room to streatch the clip to the left.
    Sorry I just had to get that out of my system....

    andynick wrote:
    Yes - and I'm another who loves FCP X . . .
    (but doesn't it drive you round the BEND somitimes)?
    Absolutely Andy.... I won't go into what does and doesn't drive me mad, but your absolutely right, at times I have a smile from ear to ear, and other times I'm left scratching my head and spending valuable time trying to work out a workaround or workflow.
    andynick wrote:
    I think Apple's recommendation of 4GB RAM is a joke.
    True... I spent a day with a colleague editing side by side. He has a 17" MacBook Pro Quad 2.3Ghz with 4GB RAM, and I run on a 17" MacBook Pro Quad 2.3Ghz with 8GB RAM. You wouldn't believe the difference an extra 4GB's of RAM can make, I can only imagine how your system will run on 16GB
    BenB wrote:
    You can right-click a clip to remove keywords, but the only option as present it to remove all keywords at once (Cntr+0). Cmd+K to remove one keyword when you have multiple keywords seems pretty dang easy to me.  If you had more than one Keyword, what would the option in a menu be?  It could make for a very long menu, it'd have to be a dynamic menu, it'd get too convoluted.  So, Contrl+0 or Cmd+K seems pretty easy and efficient to me.
    Ben it was only a suggestion…! Anyway It's probably best we rest this here, it's clear we have different opinions on this one
    BenB wrote:
    As for workflow, no, FCP X is a totally different workflow than any other NLE, period.  You can't compare.  I've been training editors for years who have lots of experience, are from cable networks, and they still walk away faster, more efficient editors.  Thus, I have to say, how long you've been editing, and how many different systems you've use, really doesn't have any bearig when learning something, especially as radicallly different as FCP X.
    Who's comparing?
    The only reason I mentioned what software I've edited on in the past, was so you can see my ability to adapt. FCP X isn't that different! you still work with media, you still need to manage, organise  or name your bins, or in FCPX's terms keyword collections. The list could go on....
    Anyway I'm not here to boast about my experience or the software I've edited on, instead I posted a "personal" view in what I thought would make a nice enhancement, which at the end of the day is just my view…
    BenB wrote:
    I've worked with Larry Jordan a couple of times.  Good tips and tricks stuff.  But the Apple authorized training materials are best for learning from the begining and getting a good handle on things in general.  Nobody (and I mean nobody) knows FCP X like Steve Martin.
    I respect your advise and have just purchased, and am now downloading Steve Martin's tutorials.
    You've got me curious... I'd like to see how different Steve Martin explains FCP X as opposed to Larry Jordan's videos.
    I'll report back on this one as soon as I've viewed them all
    BenB wrote:
    Fill out the feedback page, as I have done a kazillion times already, and let Apple know we need these new Sync'ed Compounds to retian the keywords of their originals.  It would make for a faster workflow.  Seems it'd be easy for them to program in.
    Already done and let's hope so.....
    BenB wrote:
    Here's what I do when sync'ing a bunch of stuff.  I create a Smart Collection that is just a Text parameter that "includes" the word "Compound".  Then when I make the new Compound clips, I can get right to them.  It's a workaround.
    10 points for this tip Ben....
    This is a perfect example where someone (me) expresses his thoughts, then someone (you) finding a solution.
    Love your work mate....!
    BenB wrote:
    I don't do multiple syncs at once, because of bugs, that's all.
    Sorry to sound like a broken record, but an explanation as to why and what bugs would be wonderful.
    Ben, again please don'y take my response as being aggressive. I believe we all come to these discussion forums because some of us have questions, others idea's, and most importantly the ones that give us solutions. That's what makes this community a happy place to come too

  • What's so good about Final Cut Pro?

    Hi everyone, I am totally new to Macs, switching over from the PC. And so far, I have to say that I honestly enjoy the Macs a lot more than the PC's. With that being said, my wife's friend was telling us that we should invest in Adobe Photoshop and Final Cut Pro. The problem is we know nothing about the two programs other than photoshop is obviously working with photos and final Cut has something to do with movies.
    So can someone please tell us whats so good about these two programs. And if we were to buy them, is there some sites that offer good tutorials to learn how to operate each of them?

    A quick tour of Final Cut Pro can be found here:
    http://www.apple.com/finalcutstudio/finalcutpro/
    and Final Cut Express here:
    http://www.apple.com/finalcutexpress/tutorials/
    There are paid tutorials found at Lynda.com. And a smattering found ALL OVER THE PLACE...some on the Creative Cow:
    http://library.creativecow.net/tutorials/applefinalcutpro
    But those are advanced ones for people already familiar with FCP. The ones on Lynda.com are for beginners through experts. And there are books:
    http://www.amazon.com/Apple-Pro-Training-Final-Cut/dp/0321502655/ref=pdbbs_sr1?ie=UTF8&s=books&qid=1241043298&sr=8-1
    http://www.amazon.com/Focal-Easy-Guide-Final-Cut/dp/0240810090/ref=pdbbs_sr4?ie=UTF8&s=books&qid=1241043298&sr=8-4
    And a REALLY good one:
    http://www.amazon.com/Class-Demand-Complete-Training-Educational/dp/B000WGLAQU/r ef=sr116?ie=UTF8&s=dvd&qid=1241043298&sr=8-16
    Tutorial DVDs:
    http://www.amazon.com/Final-Cut-Pro-Training-Tutorials/dp/B0024610ZC/ref=sr115?ie=UTF8&s=software&qid=1241043298&sr=8-15
    Shane

  • Final keyword and return type ...

    static byte m1() {
    final char c = 'b';
    return c; // THIS IS FINE NO COMPILER ERROR
    static byte m2() {
    char c = 'b';
    return c; // COMPILER ERROR
    The first return type is LEGAL, but the secoond type is not because it is not final. Why is this the case? Going from a char to a byte is a down conversion. Why does the compiler allow it for a final variable and dis-allow it for the other variable?

    i am curious... what is this one about ?See section 5.2 of the JLS, regarding assignment conversion:
    Assignment conversion occurs when the value of an expression is assigned (�15.26) to a variable: the type of the expression must be converted to the type of the variable. Assignment contexts allow the use of an identity conversion (�5.1.1), a widening primitive conversion (�5.1.2), or a widening reference conversion (�5.1.4). In addition, a narrowing primitive conversion may be used if all of the following conditions are satisfied:
    The expression is a constant expression of type byte, short, char or int.
    The type of the variable is byte, short, or char.
    The value of the expression (which is known at compile time, because it is a constant expression) is representable in the type of the variable.

Maybe you are looking for