I have an object with some attributes and would like to store the value of one (the attribute is "state" and has value "closed") in a variable to compare its value by an "if" statement. What I'm looking for is doing something depending on the va...
I am a beginner in terms of OOP, and right now I am doing a code for a veterinarian where I have to make an arrangement of objects and put animal data.
This is the parent class (which, as you can see is Abstract)
package veterinaria;...
Empty properties of a polilyne type object
I need to empty a polilyne type object so that it can be reused as many times as needed, I want the properties to remain empty, for example the object when you have values has something like that
l...
public static void main(String[] args) {
Scanner teclado = new Scanner(System.in);
System.out.println("Introduzca el numero deseado de objetos: ");
int n = teclado.nextInt();
String vector[] = new String[n];
for (int i = 0;...
EDIT
I want to print the 11 players that the user types in the interface.
Player is an object with the data string dorsal, last name and position.
Gamer is where the whole interface you see below is.
Driver is listener where I add functi...
I have an activity where a series of fields are filled. In it I have a button where when I press it opens a recyclerView, which presents the data of a table. When selecting one of the items in the RecyclerView, I want the object to be passed to...
This time I have a question, I have this example object:
"pasada" : {
"09-10" : 34.11,
"09-11" : 35.73,
"09-12" : 34.03,
"09-13" : 35.85,
"09-14" : 38.75,
"09-15" : 34.07,
"09-16" : 32.46,
"09-17" : 34.57
}
W...
Good evening, I am trying to pass an arraylist of type object from one activity to another but it has not worked. I have tried this way without success.
Activity 1:
ArrayList<DatosReferencia> Lista = new ArrayList<>();
//Lo e...
var objeto = {
sub1_A: {},
sub1_B: {},
sub1_C: {}
}
I have no problems if I do the following:
objeto.sub1_A.sub2 = "Prueba";
But yes if I descend a level more directly:
objeto.sub1_A.sub2.sub3 = "Prueba";
If I try to set the...
I have an object in Javascript with different attributes, some of them are arrays .
I would like to know if there is any function of any kind style. toString() to return a text string with all the data.
Example:
let p...