java - Class Methods Inheritance -


I was told that there was no legacy of static methods in Java, but when I try the following test

  package test1; Public square Main {/ ** * @ Ultimate Command Line Argument * / Public Stable Zero Main (string [] Args) [TB .ttt]; TB.ttt2 (); }}  

  Package test 1; Public class TA {Static Public Boolean (ttT) {System.out.println ("Test Inheritance A"); Back true; } Stable public string test = "Class A"; }  

  Testing package 1; Public class increases TB TA (static public zero TTT2) {System.out.println (test);}}  

It has been printed:

Test Inheritance A Class

Then Java is legacy (and field) inherited (if you try to call class method, this class goes along with the legacy series in search of methods Is it ever a matter? And is there any such legacy Oo languages ​​that are class Are there ways to mess up like this?


So apparently static methods have been inherited, but they can not be overheaded, so the part of the C # is this problem? In Java, fields and static methods have inherited, but can not be overridden - I believe that whoever tells you that "they are not in heritage" means.

Non -Members of private, non-static methods And can be overridden.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -