What do you want to save?
Add Code snippet
New code examples
-
Java 2021-09-17 23:18:04
develop a program in java private member of super class cannot be accessed derived class
class Teacher { private String designation = "Teacher"; private String collegeName = "Beginnersbook"; public String getDesignation() { return designation; } protected void setDesignation(String designation) { this.desi... Add solution -
Java 2021-09-11 00:31:03
overloading and overriding in java
Method overloading is providing two separate methods in a class with the same name but different arguments, while the method return type may or may not be different, which allows us to reuse the same method name. Method overriding means defining a method... Add solution -
Python 2021-09-09 16:34:03
Python subclassing a class with custom __new__
# python messing with __new__ and __init__ # create an instance that returns itself or its subclass, or whatever # depending on whatever condition we have created class parent: def __new__(cls, *args): print('parent', i, args) # see below ... Add solution -
Java 2021-09-05 08:57:03
method overriding java
Method overloading is providing two separate methods in a class with the same name but different arguments, while the method return type may or may not be different, which allows us to reuse the same method name. Method overriding means defining a method... Add solution -
Java 2021-08-27 18:48:01
Inheritance
it is used to define relationship between two class, which a child class occurs all the properties and behaviours of a parent class. Provides code reusability. Ex: in my framework I have a TestBase class which I store all my reusable code and methods. ... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5