Static and Non Static Method Intercall in Java
Posted
by
Vishal
on Stack Overflow
See other posts from Stack Overflow
or by Vishal
Published on 2012-07-09T21:06:12Z
Indexed on
2012/07/09
21:15 UTC
Read the original article
Hit count: 594
I am clearing my concepts on Java. My knowledge about Java is on far begineer side, so kindly bear with me.
I am trying to understand static method and non static method intercalls. I know --
- Static method can call another static method simply by its name within same class.
- Static method can call another non staic method of same class only after creating instance of the class.
- Non static method can call another static method of same class simply by way of classname.methodname - No sure if this correct ?
My Question is about non static method call to another non staic method of same class. In class declaration, when we declare all methods, can we call another non static method of same class from a non static class ?
Please explain with example. Thank you.
© Stack Overflow or respective owner