Answer:
Encapsulation
Explanation:
Encapsulation is referring to the concept that data buding with some approach or method that is applied to that selected data. it also restricts the use of some internal data of an object. The motive behind restricting the data is to prevent the misuse of the data.
For example- in java, encapsulation is refer to the wrapping of code with the data in one unit.
Let us consider a, b, c, d, e, f the six numbers.
If the average of 6 numbers is 19 then
(a + b + c + d + e + f)/6 = 19
=> a + b + c + d + e + f = 114 (1)
And if the average of 5 numbers is 20 then
(a + b + c + d + e)/5 = 20
=> a + b + c + d + e = 100 (2)
We will replace (2) in (1) And it will result that
100 + f = 114 => f=114, the sixth number.
Answer:
Explanation:
1. The answer is No, interface cannot have constructors. ... In order to call any method we need an object since there is no need to have object of interface, there is no need of having constructor in interface (Constructor is being called during creation of object).
2.A final class is considered complete and can not be subclassed (It's methods can not be overridden ). In case of abstract class, we have to proved implementation to abstract methods in subclasses. A final class can not have abstract methods and an abstract class can not be declared final.
3.private constructors are acceptable, however the class should be marked final instead, as doing so means the class is to be extended.
4.Yes! Abstract classes can have constructors! Yes, when we define a class to be an Abstract Class it cannot be instantiated(i.e an object cannot be created) but that does not mean an Abstract class cannot have a constructor. Each abstract class must have a concrete subclass which will implement the abstract methods of that abstract class.
Answer: for coding or programming one must have a pc i5 atleast or higher .processor with 8 gb ram is ideal but 16 gb ram would be best choice.