Cursos
Cursos
Compilador de Código
Compilador de Código
Debatir
Precios
Teams
Iniciar sesión
Registrarse
Menu
Sesiones de PyR
Buscar
Buscar
Haz una pregunta
Haz una pregunta
Why does not it give compile time error when I use void as return type of the constructor ?
constructors
java
return
2 Votos
1 Respuesta
5th Apr 2020, 11:21 PM
Rahul Kumar
How do you create a constructor for a hashdet that adds the elements to the colections?
java
0 Votos
2 Respuestas
16th Sep 2016, 11:42 PM
Alexis
HOW CAN I INHERIT THE BASE CLASS CONSTRUCTOR because I'm getting errorAND WHAT OTHER ADJUSTMENTS CAN I MAKE TO IMPROVE MY CODE?
c++
0 Votos
3 Respuestas
20th Nov 2019, 6:29 AM
MASANGA KAUKA MUDENDA
IN CPP Using class initializer list?
constructor
initializer_list
oops
1 Voto
2 Respuestas
2nd Mar 2018, 4:56 PM
Melodemon Alpheus
BASE CLASS CONSTRUCTORS AND DESTRUCTORS ARE NOT INHERITED TO DERVIED CLASS ..THEN HOW THIS ...
constructor
destructors
inheritance
1 Voto
2 Respuestas
6th Nov 2017, 4:47 PM
I'm_Groot
IN CPPHow can we pass arguments to the constructor of a dynamically allocated array of classes?
arrays
c++
constructors
dynamically_allocated
methods
objects
oops
pointers
0 Votos
1 Respuesta
2nd Mar 2018, 4:53 PM
Melodemon Alpheus
In Java, can you pass an object to a method within the constructor for that object?
java
1 Voto
1 Respuesta
3rd Feb 2017, 6:17 AM
Daniel
can anyone teach me about constructor in java... pls help me its urgent... thanks in advance...
java
-1 Voto
2 Respuestas
8th Sep 2017, 4:23 PM
Sauvik Saha
what can i do for call a private constructor from another file to open a window?
constructors
java
package
pc
private
0 Votos
1 Respuesta
25th Feb 2017, 3:01 PM
Ismael Perbech
Can anyone plz elaborate the calling of constructor and destructor by giving some program as example?
c++
constructors
0 Votos
1 Respuesta
23rd Jul 2016, 7:21 PM
Kaivalya Dalvi
Does anyone have a MyString constructor I could look as a reference? Be a great help☺
java
0 Votos
1 Respuesta
25th Mar 2017, 5:58 PM
bobo
My base class has constructor and derive class has default constructor, but it can't compile. Can anyone give me a proper explan
base
c++
class
derive
inheritance
1 Voto
3 Respuestas
18th Oct 2019, 1:28 PM
#ArizmaAltair PATHAN
In OO languages, what is the advantage of using factory methods and private constructors to create objects?
advantage
constructor
factory
method
oo
private
6 Votos
8 Respuestas
15th Dec 2019, 11:13 PM
Sonic
Why not able to use initializer list
c++
constructor
initializer_list
0 Votos
1 Respuesta
27th May 2022, 11:47 AM
Ketan Lalcheta
How to make a site?
constructor
css
html
js
0 Votos
3 Respuestas
13th Nov 2021, 9:12 AM
Матвей Барканов
It is successfully Compiled but The Result is null. Why
conditional
constructor
if
input
java
1 Voto
5 Respuestas
9th Mar 2023, 8:05 AM
We Doru
In a class,if we have a constructor and methods with same name and without argument is this is possible to have like this?
i
needit
0 Votos
7 Respuestas
29th Jul 2017, 4:25 PM
vani s
Why, when I input 42 to the circle constructor the area gives me 5541.769440932395 while the correct answer is 5541.769440932396
abstractclass
inheritance
java
oop
1 Voto
1 Respuesta
27th Dec 2022, 10:34 PM
Genniell Vergaray
Java: How can the object of parent class call the parameterized constructor of child class while it's not the other way around?
classes
constructors
java
objects
0 Votos
4 Respuestas
26th Apr 2022, 9:36 PM
Farzam Baig
Why we need to call super() method in default constructor?? why we need to parent class constructor ?? why it is compulsory?
constructors
java
oop
1 Voto
5 Respuestas
9th Oct 2017, 9:20 AM
Ankit Singh Rawat
How do you know when you have too many methods on the prototype/constructor and how can you plan to use a fair amount of each?
classes
constructor
javascript
memory
objects
prototype
4 Votos
5 Respuestas
6th Jan 2019, 10:47 PM
Thomas Czernek
C++ How to avoid Object Slicing with derived classes being stored in base vector
c++
constructor
object
slicing
0 Votos
4 Respuestas
10th Apr 2020, 4:22 PM
Tyler
What's the advantage of member initializers?
c++
constructor
initializer
member
2 Votos
1 Respuesta
5th Apr 2019, 7:54 PM
HonFu
JS : What exactly is CLASS and in what case do you need it?
class
constructor
js
purpose
use
3 Votos
5 Respuestas
2nd Jan 2022, 6:13 AM
Ginfio
If a class that inherits from another class automatically also inherits its constructor then why bother using super().__init__?
python
python3
0 Votos
1 Respuesta
28th Apr 2022, 8:07 AM
Lenoname
If I inherit derived class from base class as private what will be the order of constructor and destructor?
c++
inheritance
1 Voto
2 Respuestas
30th Aug 2016, 4:53 PM
Sunitha Ganti
[javascript] Syntax for adding method to retrieve properties from that class?
class
constructor
javascript
method
0 Votos
4 Respuestas
6th Dec 2017, 7:38 AM
Joe
if a sub class besides those inherited attributes has it's own attribute how should the constructor look like?
java
0 Votos
1 Respuesta
21st Sep 2022, 10:37 PM
Lenoname
Destructor + unset
constructor
destructor
php
0 Votos
1 Respuesta
8th Jun 2019, 5:23 PM
Maksym Biliaievskyi
How do I pass arguments to the superclass constructor while creating an object of the subclass in this case?
inheritance
1 Voto
1 Respuesta
15th May 2019, 1:56 AM
Debraj Singh
Problems with object constructors
constructor
html
javascript
js
object
objects
web
7 Votos
14 Respuestas
15th Nov 2017, 10:04 PM
Jay
OOP with JS ,, Could you help me with OOJS ? Object-oriented javaScript
class
constructor
javascript
objects
oop
1 Voto
4 Respuestas
19th May 2020, 8:45 PM
Raven
When we create objects of one class its constructor is invoked and we call its destructor then can we again use the object after
constructors
3 Votos
2 Respuestas
24th Oct 2021, 12:55 PM
Abhishek Pandey
How to write constructor for class B if it is a derived class of A? How to instantiate?
c++
constructors
inheritance
0 Votos
2 Respuestas
23rd Nov 2016, 1:51 PM
Marcell Juhasz
why destructor in this code doesn't runs in visual studio's console application
c++
constructor
destructors
error
sololearn
2 Votos
5 Respuestas
27th Aug 2018, 4:56 PM
Suraj Jha
From the code given below, the output should be 12(because constructor never inherit ) but it is 112 . How? Someone can explain.
c++
constructors
inheritance
0 Votos
5 Respuestas
21st Dec 2016, 4:09 AM
blumen
C#, I'm struggling with everything. Please assist.
constructor
inheritance
polymorphism
0 Votos
1 Respuesta
18th Aug 2017, 10:43 AM
Mncedisi Nceddy Mzizi
Constructor Chaining in Java Please help what is wrong in this code as it does not compile and throws exception at this(hello())
constructors
inheritance
java
super
this
0 Votos
2 Respuestas
23rd Aug 2020, 10:18 AM
anshu kulshrestha
Is use of constructor in any program good or bad, if bad. What is another solution for construction based problems?
c++
python3
0 Votos
2 Respuestas
6th Oct 2019, 3:22 PM
Pushpendra Singh
what if i declare a parameter inside constructor which has private access specifier, would parameter also be private?
cpp
0 Votos
1 Respuesta
13th Aug 2018, 2:21 PM
Arush Joshi
Although we have a default protected constructor in abstract class , why we can't create a new instance from it?
abstract-classes
c#
oop
1 Voto
2 Respuestas
2nd Aug 2017, 4:01 PM
Amin Saadati
(a) When p3 object is created, specify which constructor gets invoked and why? (b) Write complete definition for Constructor3.
and
constructors
des
0 Votos
1 Respuesta
29th May 2018, 6:29 AM
heer patel
Why do we make an object constructor using this keyword and don't we simple write return { a: x, b:y} in the function?
javascript
2 Votos
1 Respuesta
27th Oct 2020, 5:27 PM
Karak10
Is a globally declare function whose name is same as that of class can be a constructor in c++?
constructors
declare
globally
0 Votos
2 Respuestas
16th Feb 2017, 1:08 PM
Deepika Behera
Why 6 calls to destructor for 5 objects?
c++
constructor
copy-constructor
destructor
vector
1 Voto
1 Respuesta
30th Jun 2022, 9:31 PM
Edward Finkelstein
I really want to know what is constructor function? I make plenty of research on it but still I did not get exactly what it is.
c#
java
0 Votos
3 Respuestas
3rd Oct 2021, 11:30 AM
Azzuro
Anyone can explain this?? Generally a constructor of base class doesn't inherit to derived class..... But here I'm confused...
c++
classes
constructors
0 Votos
1 Respuesta
9th Sep 2017, 2:06 PM
Harsha Sanju
Constructor of every object in vector is called everytime I add a new element. How do I resolve this?
c++
0 Votos
1 Respuesta
27th Mar 2017, 1:09 PM
denzal maradona
Is there any difference between creating new object with the default copy constructor and declaring a reference to it?
c++
copy_constructor
reference
0 Votos
1 Respuesta
26th Nov 2016, 3:29 PM
Marcell Juhasz
Why do we need a constructor to set up start values for attributes when we can already set them right after declaring attributes
attributes
constructors
1 Voto
3 Respuestas
27th Apr 2017, 4:20 PM
Tina
Haz una pregunta
Haz una pregunta
Haz una pregunta
Haz una pregunta
< Anterior
1
...
11
12
13
Siguiente >
En tendencia hoy
The hidden trap in python function
3 Votes
OOP python questions
1 Votes
What's wrong with my code?
1 Votes
How to create games and it to Play store
2 Votes
Python loops
1 Votes
Web page
1 Votes
Percobaan
0 Votes
What is a web browser intension?
1 Votes
Mentors
0 Votes