Re: Overriding static methods : Whats wrong with these classes??
ankur wrote:
package Pack1;
Side note: Java naming conventions call for package names to comprise all
lower-case characters. (In real life, package names that include variations
on "package" within their names do not make good names.)
public class SuperA {
public int supervarA;
Java naming conventions call for word parts within names to be capitalized,
such as "superVarA". (In real life, "super" and "var" would be name parts to
avoid in a variable.)
public void superMethA()
{
System.out.println("Package Pack 1 Class SuperA");
}
public static void methstaticA()
Likewise this should be named "methStaticA" by convention (except that in real
life "meth" and "static" would be name parts to avoid).
{
System.out.println("In class SuperA");
}
}
Further side note: do not use TAB characters to indent Usenet posts, use
spaces. Two (or up to four if you like) spaces are enough per indent level.
Usenet readers often have more restrictive width constraints than your
favorite source editor (although many folks recommend keeping source lines
limited in width, too). TABs tend to render posted code less readable,
hindering efforts to help you with your question.
--
Lew