Tag:java interface class inherits bastract
The first question: the static code block when the class is loaded, and the static code block acts in order to initialize the value. The second question: constructs a block of code prior to the call to the constructor, regardless of the location of the method declaration. The order is: Load class => execute static code block => instantiate class => execute construct block of code = > executes the constructor. constructs blocks of code to initialize the values of object property members. The third question: executes a static block of code, Class.forName ("Benz", Flase,benzdemo.class.getclassloader ()); fourth question: Class Person{ ..... }class Man extends Person{   &NBSP, ...} CLASS WOMAN EXTENDS PERSON{   &NBSP, ...} Question Fifth: The abstract method must be in an abstract class, the subclass of which inherits the abstract class must have member properties to overwrite (override) The member property of the abstract class. cannot be instantiated by using the abstract keyword modifier. abstract classes have constructors and cannot be overloaded. Question sixth: abstract + final abstract + private Seventh: super (); Accesses the constructor of the parent class. this (); Accesses the constructor of the current class. Question eighth:    &NBSp;interface iwhite{ public string iwhite (); } interface IRich{ Public int irich (); } interface ibeauti{ public string ibeauti ();  ,} nineth question: class WomenStar implements IWhite,IRich,IBeauti{ public String iwhite{ return "White"; } public int IRich{ return 100000000; } public String IBeauti{ return "Beautiful"; } public boolean Tomarring (String white,int rich,string beauti) { if (white == this. Iwhite () && rich >= this. Irich && beauti == this. Ibeauti ()) { return true; } return false; }   the tenth question: class earchricher{ Public static void main (String[] args) { boolean result = marring (); string str = result ? "Success! " : " Failed! "; system.out.println (); } public Boolean Marring () { womenstar w = new womenstar (); return w.tomarring (); } }
This article from "Do Not Tang donation" blog, please be sure to keep this source http://senlinmin.blog.51cto.com/6400386/1771119
Big Data Java Foundation Fifth day job