Most voted "arraylist" questions
The Arraylist class is an implementation of the List interface that uses an array to store elements.
Learn more…257 questions
Sort by count of
-
0
votes1
answer187
viewsDifferent global variables that when one is changed change the value at all
I have a class responsible for managing certain call variables clusters, these are a vetor de vetores yesterday contains a word and an associated value. But every time I make an adjustment to the…
-
0
votes1
answer118
viewscompare Array with another Array com for in Java
Everybody, Good afternoon. I am wanting to compare 2 Array, where 1 array has randomly set value. I want to use for so I don’t have to repeat 100 times. But I don’t know, because it always shows me…
-
0
votes0
answers33
viewsFeed image links via PHP: Wordpress
to using a theme that currently has the portfolio option, but it does not natively offer an option to add link the added images. Request to modify the file. PHP, but I can’t find a way to feed one…
-
0
votes0
answers103
viewsHow to send to the back end an Array inputFiles via form?
I have a form that besides the input file has other inputs like for example the input name.. select type... In the input file I need to get more than one file, I got this with help from the people…
-
0
votes3
answers1124
viewsHow to pass javascript array to form and get the values in php?
I have a form that creates a list of selected images before sending through an input type='file' However how can I pass the Array Javascript to the form and submit it by clicking on action? I need…
-
0
votes1
answer1245
viewsHow to initialize an Arraylist in the constructor?
I have to develop a program in Java that will rent a library. In one part of the program I have to make a ArrayList of publications, follows the question: We must create a system for controlling…
-
0
votes1
answer56
viewsProblems with PHP Array
I’m trying to work with arrays but I’m having difficulty accessing the items or they see grouped or they generate several arrays, which I can’t access. CONTROLLER $listaDescontos =…
-
0
votes1
answer217
viewsMerge the values of an Array inside another Array
I have several Arrays throughout the program to check identifiers Soon in a function I check a include to know if a particular identifier is inside an object the object has the following format {…
-
0
votes1
answer67
viewsInsert data into a Javascript array #NODE ERROR( EMFILE: Too Many open files, open )
I have 3 arrays in my code, INFO, INFOS AND TEST. And I need to make a function check if the position of my test variable is equal to my info variable and if it is equal, the final variable is: In…
-
0
votes1
answer85
viewsFocus an entire array on a variable that prints in DOMPDF
I read a few posts here, but nothing that would give me a north. I have a php that I printed in PDF, with two querys that consult the database, one table has a foreing key of the other. That is, for…
-
0
votes1
answer57
viewsAndroid - Arraylist is not being filled
I created a code with a contact class public class Contato { private String nome; private Integer foto; private String ramal; private String setor; private String email; public Contato(String nome,…
-
0
votes1
answer48
viewsListview prints only the first element of Arraylist
My application has a screen that lists all the elements registered in BD. The method I use to list the results returns a List (in the Diagnosticodatasource class), until then all right, the problem…
-
0
votes1
answer41
viewsHow to capture data correctly from the list?
I put the code down on onCreate and onResume, but of the problem when putting in the onResume. Whenever I return/leave the editing screen, onResume goes into action and goes through the whole list…
-
0
votes1
answer304
viewsAdd a new object in a list in another class
I populated a list of dishes from a restaurant, after that, I added a function for the user to create a new dish when they want. However, in the method to create the new dish, I cannot add to the…
-
0
votes2
answers172
viewsHow to access an attribute in a Java Arraylist?
I created an application that receives some data and gathers in a ArrayList of a class that is in another package. How do I recover an attribute that is private by getter that is in the other class…
-
0
votes0
answers12
viewsSend Arraylist from an Acttivity to a Fragment
Good afternoon, everyone, I am trying to send an Arraylist of an Activity to a Fragment that will use it in a Gridview, but I have not been successful. When clicking the button the Activity creates…
-
0
votes1
answer53
viewsBring bank result and put in a list to use with variables
I’m working with Python 3.7. I am trying to define variables with data from a list[], the values of the list[] is a result coming from the database, but is giving error. Code: conn =…
-
0
votes0
answers16
viewsPosition search Itemclick Arraylist
Good Night, I have an Activity with Recyclerview and Searchview by clicking on any cell brings me a new attempt with the information of the chosen cell, but when searching a given word returns item…
-
0
votes0
answers20
viewsReceive a number through a Stored Process c#
I have an object that has properties of various types and one of them is a List <int? >, however when executing a precedent it returns me only one number, does it work if I remove the list and…
-
0
votes0
answers34
viewsDifficulty in understanding problem solving
My problem is this; I was solving some exercises of the hacker rank platform and I came across a question that asked me to identify the only value in an array that did not repeat. I couldn’t think…
-
0
votes2
answers31
viewsLocking app when adding a new page in Pageradapter
I’m creating a Viewpager using a Pageradapter, and a Tablayout for the pages, it creates pages normally, but when I try to create a new page after setting the Adapter from Viewpager, the Crasha app,…
-
0
votes1
answer23
viewsStore CSV file data in a list
I am reading a 9 million-line CSV file, and I need to turn each line into an object and store it in a list or buffer to subsequently write to a random access file. When I try to add the investor…
-
0
votes2
answers42
viewsCompare the data of an Arraylist not to let register in duplicity - Java
Good afternoon to all I need to compare all the indexes of this arrayList with the Indice that is currently being added, it is possible? //MENU - CADASTRAR PRODUTOS private void cadastrarProdutos()…
-
-1
votes1
answer267
viewsException in removing the last element of Arraylist
My Problem: I have an Arraylist of an object that represents the number of lines in my Jtable, model class. well, all the other methods are working perfectly, the problem is the remove() I have no…
-
-1
votes1
answer89
viewsPrevent object from replacing others in Arraylist
I have two loops that have the function of replacing texts with other values. The problem starts when I have an object added to a ArrayList, in the case the object clone. The addition is in the…
-
-1
votes1
answer511
viewsArray[] in database, how to create and manipulate?
I own a array of integers, a int[]. Is it possible to save it directly to the database without having to Serialize? For example: CREATE TABLE teste( numeros integer[] ); And then use SELECT numeros…
-
-1
votes1
answer166
viewsPass data contained in Arraylist to attributes of an object
Through Scanner, I read a file . htm and pass the data contained in it to a String Arraylist. I need to assign this data from Arraylist to "game" objects. The Game class already exists, with all…
-
-1
votes4
answers2763
viewsAdd array elements in Arraylist and print values
I have two questions about ArrayList: Is there any way I can start the values without having to use the .add every time? For example, the normal vector uses int vetor[5]={1,2,3,4,15} and puts the…
-
-1
votes1
answer27
viewsDelete position of array
Good afternoon I have an order app, record the items within an array when I need to delete an item from the request, somehow the array size does not decrease for example I registered 3 items and…
-
-1
votes1
answer36
viewsInvoking methods within an Arraylist does not recognize the object method
I try to invoke the method through the method get().getNome(), but says that the method does not exist.…
-
-1
votes1
answer49
viewsData search
good guys to with doubt here and I want to do the following in jsp I want the client to type One word to search mysql database example Eonardo then I will have several registered names of the…
-
-1
votes1
answer75
viewsHow to generate with while or do-while multiple Iterations in an Arraylist of a data set?
I have the following data set in an arraylist. Conference,Conference,1.0,1.0,1.0,1.0,1.0,1.0,true,1.0, 01,6.0 Reviewer,Reviewer,1.0,1.0,1.0,1.0,1.0,1.0,false,1.0, 01,6.0…
-
-1
votes2
answers70
viewsWhat’s the fastest way?
I made a little game in Java and the players' dice are in the database, when a player enters, he is placed in a ArrayList<PlayerData> where it contains the getters and setters of level, money…
-
-1
votes1
answer37
viewsNull array in a constructor (java)
The purpose of the code is to pass a arraylist of Sessao for the builders sala2D and 3D(in the constructor, the name of the arraylistof Sessao is "Session"). But after some tests it is found that…
-
-1
votes1
answer82
viewsHow to find an ordinary sequence of Keys in an Array?
The goal is to find the next ordinary sequence of 03 Keys within a array with broken indexes, in the example would be 4,5,6 or 7,8,9 CODE <?php $myArray = array( 'item_1', 'item_2', 'item_3',…
-
-1
votes1
answer40
viewsfill arraylist with arraylist attribute information of another class
I have an Event class with an attribute arraylist<string>lista. I fill this attribute in a Telalista Jframe and use a evento.setLista("informaçao"); to add the textField string to the…
-
-1
votes1
answer166
viewsHow to create an Arraylist with constructor method with String
Hello, I would like to know how I could add these variables within this Arraylist. The program says it is not possible to put String in Publication, I tried casting and did not give. Thanks in…
-
-1
votes2
answers49
viewsJava - Calculating the value of hours for the person responsible for an event
I am building a project (I am a student) in which I need to create an event company. The system shall provide: the amount spent with the responsible; the total cost of lectures; the total amount…
-
-1
votes1
answer19
viewsArraylist of another class does not print elements
I have a main class and another class, basically I have to read a CSV file in which the first line will have the materials of a student (matematica, portugues etc). The number of materials is N can…
-
-1
votes1
answer37
viewsI need to check that the item does not exist before adding it to Arraylist
switch (menuCad) { case 1: do { System.out.print("Digite o nome: "); String nomeProd = Stringentrada.nextLine(); System.out.print("Digite o preço: "); double precoProd = entrada.nextDouble();…
-
-2
votes3
answers1141
viewsHow to create an element search method in an Arraylist?
Assuming an Arraylist that stores objects, and these objects have attributes of various types (int, String , float, etc...). Knowing this I want to create a method to find an object in Arraylist…
-
-2
votes1
answer84
viewsProblem removing data from an Arraylist
Good afternoon, I am having a certain difficulty in reading and writing the data in an arraylist. The data from my TXT file: Mark 12345 Rafaela 54321 Kaique 12345 Matheus 54321 Just follow my code:…
-
-2
votes1
answer59
viewsHow to compare numbers in vector list?
I have an integer vector list in java (Arraylist Listvet). public static ArrayList<Integer> ListVet; And I need to make a comparison between two numbers from that same vector list. So, I did…
-
-2
votes3
answers734
viewsHow to compare Arrays?
I need to make the comparison of several Array, to search for equal values... Rules of Business There may be an array with values larger than the other. There may be Array with the same amount of…
-
-2
votes1
answer1127
viewsHow to fill an Arraylist with values of another Arraylist caught randomly?
I have the class Vetor which will have a method to start an array with random numbers: public class Vetor{ private int tamanho; private int[] vetor; public Vetor(int tamanho) { this.tamanho =…
-
-2
votes3
answers114
views -
-2
votes1
answer58
viewsError javax.el.Propertynotfoundexception: Array index out of range: 0 Java JSF intersection exercise
I’m new to programming and new to the Forum. I have a college exercise that I’m not able to do, I need to create a screen called Intersection, which takes 2 intervals and returns a message on screen…
-
-2
votes1
answer188
viewsCan’t Convert error Object of type
This one started to appear out of nowhere, apparently I didn’t change anything in the code and simply by making changes in other parts it appeared. Error: 12-07 07:47:43.652…
-
-2
votes1
answer58
viewsArraylist of classes
I have a main class that has auxiliary classes as attributes. Example: Main class MoedasList: public class MoedasList { public USD USD; public USDT USDT; public ARS ARS; } Each attribute is an…
-
-2
votes2
answers700
viewsHow to know how many positions an array has in Java?
Look at the picture; I’m uploading a CSV file, and I’m already able to count how many lines there are, in our context are three lines as shown in the code below; However I need now and how to get…