Menu

A sample site

The amazing payoff goes here

20 articles about wine coolers

JAVA CORE
- Inheritance
+ Inheritance definition ?
+ extends Keyword
+ Supper/Parent Class, sub/child class
+ A subclass inherits all the members (fields, methods, and nested classes) from its superclass.
+ Constructors are not members, so they are not inherited by subclasses
+ Constructors from super class can be invoked from the subclass
+ When do we use The super keyword ?
+ instanceof keyword
 

Image: 2017-04/1491587138_binh-sua-comotomo-150ml.jpg

JAVA CORE
- Inheritance
+ Inheritance definition ?
+ extends Keyword
+ Supper/Parent Class, sub/child class
+ A subclass inherits all the members (fields, methods, and nested classes) from its superclass.
+ Constructors are not members, so they are not inherited by subclasses
+ Constructors from super class can be invoked from the subclass
+ When do we use The super keyword ?
+ instanceof keyword
+ A sub classs can inherit how many super classes ? (Only 1, but it's possible with interface)
- OverridingThumbnail
+ Overriding definition ?
+ The access level cannot be more restrictive than the overridden method's access level
+ A method declared final cannot be overridden
+ Can an abstract method be overriden ? Yes


+ Constructors cannot be overridden
- Polymorphism
+ Polymorphism is the ability of an object to take on many forms
+ class Deer extends Animal implements Vegetarian{}
- Abstraction
+ Write a class with one abstract method and one non-abstract method ? (Must be an abstract class)
+ Abstract classes may or may not contain abstract methods
+ If a class is declared abstract, it cannot be instantiated
+ How to use an abstract class ? (Must inherit the abstract class and implement all abstract methods)
+ Different between abstract method and non-abstract method ? (abstract class has no body, and ends with ;)
+ Can an abstract class extends another abstract class ?
+ Don't want implement an abtract method ? Declare itself as abstract
- Encapsulation
+ Hide all variables, access through get/setters.
- Interface
+ Interface contains abstract methods, constants, default methods, static methods, and nested types
+ Method bodies exist only for default methods and static methods (From Java 8)
+ Differences between interface and abstract class ? (methods, constructors, instantiation, implements/extends..)
+ An interface can extend multiple interfaces.
+ Interfaces and its methods are implicitly abstract, don't need to define abstract keyword
+ Abstract class don't need to implement all interface methods.

- Others:
+ What is difference between static method and instance method? Access together, instantiation in using.
+ Implement for utility methods ?

Written by Administrator on Friday April 7, 2017

Whoops, looks like something went wrong.

1/1 RuntimeException in FileProfilerStorage.php line 143: Unable to create the storage directory (/home/zwbixvna/boltdata/app/cache/profiler/17/2b).

  1. in FileProfilerStorage.php line 143
  2. at FileProfilerStorage->write(object(Profile)) in Profiler.php line 120
  3. at Profiler->saveProfile(object(Profile)) in ProfilerListener.php line 158
  4. at ProfilerListener->onKernelTerminate(object(PostResponseEvent), 'kernel.terminate', object(TraceableEventDispatcher))
  5. at call_user_func(array(object(ProfilerListener), 'onKernelTerminate'), object(PostResponseEvent), 'kernel.terminate', object(TraceableEventDispatcher)) in WrappedListener.php line 61
  6. at WrappedListener->__invoke(object(PostResponseEvent), 'kernel.terminate', object(EventDispatcher))
  7. at call_user_func(object(WrappedListener), object(PostResponseEvent), 'kernel.terminate', object(EventDispatcher)) in EventDispatcher.php line 184
  8. at EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener)), 'kernel.terminate', object(PostResponseEvent)) in EventDispatcher.php line 46
  9. at EventDispatcher->dispatch('kernel.terminate', object(PostResponseEvent)) in TraceableEventDispatcher.php line 140
  10. at TraceableEventDispatcher->dispatch('kernel.terminate', object(PostResponseEvent)) in HttpKernel.php line 84
  11. at HttpKernel->terminate(object(Request), object(BoltResponse)) in Application.php line 598
  12. at Application->terminate(object(Request), object(BoltResponse)) in Application.php line 565
  13. at Application->run(null) in Application.php line 93
  14. at Application->run() in index.php line 12