Originally posted by shadow liu:
As I remember, the calling sequence is below:
1) if there are super or this call in constructor, do it.
2) call superclass (till Object) constructor
3) then the initial part the class
4) the rest of the class constructor.
so this(a) is exec in 1)
but 'int a' initial will be exec in 3).
Originally posted by Lance Finney:
I forgot that main itself was static. Wouldn't my statement be true if the method weren't static?
For example, the following code returns 1 and 0. Although the variable is static, "this" has a link to it.
public class Test
static int i = 0;
public static void main(String args)
Test t = new Test();
public void amethod()
int i = 1;
Originally posted by Jini Varghese:
Choose the correct applicable statement for the following code fragment
a. no error occurs
b. compile time error occurs because the countries array object has not been created
c. runtime error occurs because the countries array object has not been created
But I got compiler error. Please confirm.
Originally posted by Jyotsna Clarkin:
Originally posted by vivek bawge:
[b]Because i am new to this list, can someone help me how to include the original post in reply and make it bold.
and include emoticons.