Questions tagged as 'objetos'

2
answers

What is the difference between a class and an object?

I was reading a book on object orientation and these two entities are treated differently. What's the difference between the two?     
asked by 28.11.2015 / 00:49
2
answers

In programming, what is an object?

In programming, it is common to hear the term objeto , often defined in multiple vague definitions, if defined. What is, in fact, an object in programming (not limited to object-oriented programming)?     
asked by 17.05.2017 / 22:22
2
answers

How to create an immutable object in JavaScript?

I know that it is possible to "freeze" an object in JavaScript using the Object.freeze method: var x = { foo:"bar", complexo:[1,2,3] }; Object.freeze(x); x.foo = "baz"; // Não tem efeito console.log(x.foo); // bar However, the comple...
asked by 18.02.2014 / 02:09
1
answer

What is the minimum size of an object in memory?

I received an answer in my question that talks about an overhead that the object has. Every object has this overhead ? Does an object with no data also have this overhead ? Is there an object of size 0?     
asked by 27.04.2017 / 14:52
2
answers

int and Integer - Java

I am developing a project in Java and it is in error, I have already found it but I do not understand it. public class Time{ private String nome; private ArrayList<Jogador> jogadores; private Integer gols; public void a...
asked by 08.05.2015 / 01:16
3
answers

Why is it possible to change an array or object value from within a constant?

const array = ["a", "b", "c", "d"]; array[1] = 2; console.log(array); //- ['a',2,'c','d'] In this example I gave, I changed the value of the constant dynamically, too, it is possible to do the same with objects. I would like to...
asked by 29.09.2018 / 01:17
4
answers

In Javascript, how to check that an object is empty (without jQuery)?

By jQuery , I can tell if a Object is empty as follows: $.isEmptyObject({}); // true $.isEmptyObject(window); // false To know if a array is empty, we can do the same thing, but without jQuery it would look like t...
asked by 31.08.2015 / 22:20
2
answers

Customize comparison between javascript objects

How do I determine what value javascript should use for logical operations on objects? I'm creating a competency object that needs the following features: Encapsulates the logic of creating a competency: month / year in MM / YYYY format...
asked by 28.11.2014 / 17:34
2
answers

What is the C ++ copy constructor for? How should I implement it?

I am programmer Java and I am currently studying C++ . In addition to the "normal" constructors (the default constructor and the parameterized constructor), C++ has a copy constructor. I would like to know what it is for and...
asked by 27.03.2014 / 18:01
1
answer

Why should a struct be at most 16 bytes?

I saw in a question about classes and structures that the latter should have a maximum of 16 bytes. Why do you have this limitation?     
asked by 08.05.2017 / 13:27