Tutor profile: Mehade H.
What is the generator in JS?
Generators are functions that can be exited and later re-entered. Their context (variable bindings) will be saved across re-entrances. Generator functions are written using the function* syntax. When called initially, generator functions do not execute any of their code, instead of returning a type of iterator called a Generator. When a value is consumed by calling the generator's next method, the Generator function executes until it encounters the yield keyword. The function can be called as many times as desired and returns a new Generator each time, however, each Generator may only be iterated once.
Subject: Java Programming
What is reflection and why is it useful?
The name reflection is used to describe code that is able to inspect other code in the same system (or itself) and to make modifications at runtime. For example, say you have an object of an unknown type in Java, and you would like to call a 'doSomething' method on it if one exists. Java's static typing system isn't really designed to support this unless the object conforms to a known interface, but using reflection, your code can look at the object and find out if it has a method called 'doSomething' and then call it if you want to.
Subject: C Sharp Programming
What is the difference between Interface and Abstract Class?
There are some differences between Abstract Class and Interface which are listed below: - A class can implement any number of interfaces but a subclass can at most use only one abstract class. - An abstract class can have non-abstract methods (concrete methods) while in case of interface all the methods has to be abstract. - An abstract class can declare or use any variables while an interface is not allowed to do so. - In an abstract class all data member or functions are private by default while in interface all are public, we can't change them manually. - In an abstract class we need to use abstract keyword to declare abstract methods while in an interface we don't need to use that. - An abstract class can't be used for multiple inheritance while interface can be used as multiple inheritance. - An abstract class use constructor while in an interface we don't have any type of constructor.
needs and Mehade will reply soon.