Questions tagged as 'java'

0
answers

Can you help me to leave a single ArrayList of the buttons

public class Tablero extends JFrame implements ActionListener { private ArrayList<Boton> listaBotones = new ArrayList(); private ArrayList<ImageIcon> listaImagen = new ArrayList(); private ArrayList<ImageIcon> listaBtn = new Ar...
asked by 01.10.2018 / 23:50
0
answers

Sum of numbers in Java pair position

I have an introduction problem to the programming. I must add the one digit numbers that are in even position: Example // Input = 32178 // Exit = 10     
asked by 03.10.2018 / 01:16
0
answers

Start new activity when swiping on a ListView

I have an app in which, the main page, is 100% occupied by a ListView that contains an ArrayList of objects. My goal is that when I slide my finger from right to left on that ListView, I will go to a new window (activity). I was guided by thi...
asked by 26.09.2018 / 13:48
1
answer

How can I call information from Firebase Database to Android Studio and show it in an activity?

Good day, I have this information saved in Firebase Database I would like to read it and show it in an activity in the following way. I have this code, I do not know what would be the simplest option or how would the onDateChange...
asked by 26.09.2018 / 15:28
0
answers

Carry a counter of objects in java Bluej

I am currently creating a class called Store, in which I am asked to have 3 objects (Notebooks) in stock and also keep track of the stock that I own, since these objects can change their number, either increase or decrease, then I need to know h...
asked by 30.09.2018 / 03:04
0
answers

Problem with MultipartFile from the Spring java framework

I am working to upload the images as avatars of the users, but it throws an error to me when trying to write the image and to keep it, I am working with MultiparFile of Spring, but I do not have much knowledge of it.    This is my RequestMapp...
asked by 27.09.2018 / 00:10
0
answers

Generate a TestCase (JUnit) where you create a list of a class already made in JAVA

I have a class called "Cost" where I have the following characteristics and methods: public class Costo { int posicion; String NumeroParte; String Descipcion; float monto; int CambioPrecio; //Constructores public Cost...
asked by 03.10.2018 / 21:03
0
answers

How can I add a song to my list in Android Studio

Hi, I'm doing a music player and one of the tasks that you should do is that when you press a button, a file browser comes up and you search for a song and that song is added to your existing list but I do not know how to get it that file and sa...
asked by 02.10.2018 / 16:47
1
answer

I try to add each position of column 0 of the position array and store it in the transit array [duplicated]

import java.util.Random; import java.util.Scanner; public class Version2 { static double procesos[][]; static int n; static double tiempo=0; static double transito[]; static double diferencia=0; public static void ma...
asked by 25.09.2018 / 15:59
0
answers

compact items that are consecutive

Example; compactar({2,2,2,2})>>>> {2} compactar({2,2,null,null,2,3})>>>>{2,null,2,3} compactar({2,2,1,2})>>>>{2,1,2} compactar({})>>>>{} compactar({1,2,3,null,null})>>>>{1,2,3,n...
asked by 28.09.2018 / 20:35