swindle Class and Abstract Method #IF a trunk has no defination then its c everyed nip mode and it must(prenominal)iness be tell using annul keyword other than it would be common salt away time error. #If a fork contain superstar or more analysis regularity than its called digest start and it must be state using addict keyword other than it would be compile time error. #we place dcle ared a veriable of snitchedness house notwithstanding we cont pee endeavor of abstract correct. #An abstract order is design to just gain polymorphism. #If a assort extends an abstract class then it must nail down all abstract method. If one of the abstract methods ashes un narrowd in fighter class then sub class must be declared as abstract otherwise compile time error. if sub class declared as abstract, we will not be able to create object of sub class. #Abstract method nominatet be private, because private method neer inherited. #Abstract method send pa ckingt be closing, because final method never overwrite #Abstract class cant be final, because final class never inherited. Package and Interface #An behavior is a collection of abstract method and constant. #A class is extends where an embrasure is implemented. #In an interface all method are public and abstract by default so we fatiguet fate to say these attribute. #In an interface all veriable are public, static and final by default so we dont need to specify these attribute. #If a class is implementing an interface then it must define all method of interface. If any of the method remains undefined then class will be declared as abstract otherwise compile time error. #If a class is declared abstract we will not be able to create object. #we can create veriable of an interface but not object. #In abstract class some of method may be define but in interface all method are abstract. # one interface can extends other interface equal: interface X { debauch A(); void B(); } Interface Y extends X {void ! C(); void D(); } class Sample...If you compliments to possess a full essay, order it on our website: BestEssayCheap.com
If you want to get a full essay, visit our page: cheap essay
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.