Search:

Type: Posts; User: SmokyBrain

Search: Search took 0.07 seconds.

  1. [SOLVED] Re: Adding the "final" keyword makes difference, I'm confused with the sequence flow.

    Thank you copeg,

    By removing the final from the line "private final int num = 10;", the program tends to have "making forward references" problem.
    Child constructor -> Parent constructor -> ...
  2. [SOLVED] [Solved] Adding the "final" keyword confused me on the sequence flow.

    Codes:


    class Parent {
    protected int value = 1 ;
    Parent() {
    value = getNum();
    }
    public int getNum(){
    return 5;
Results 1 to 2 of 2