Classes in Java | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
- 1

Classes in Java

Which of these classes will have more memory allocated: (1) Class with 3 methods,4 variables,no object (2) Class with 5 methods,3 variables,no object

23rd Jun 2021, 11:48 AM
Iam_IKHINE
Iam_IKHINE - avatar
2 Antworten
+ 3
Iam_IKHINE Memory depends on objects not methods because objects stores in heap memory.
23rd Jun 2021, 11:52 AM
A͢J
A͢J - avatar
0
So the first option is correct. Right?
25th Jun 2021, 5:29 PM
Iam_IKHINE
Iam_IKHINE - avatar