Questions tagged as 'java'

1
answer

Array [] print

I have a problem printing a String [] that is inside an ArrayList of objects when printing some prints as null. Pasaporte - Jose Gregorio Silva Guedez.PDF C:\Users\Javier Marín\Documents 5 Votantes: [ null, null, null, null, null, null, null,...
asked by 21.09.2018 / 18:15
1
answer

Why does not the return work for me? JAVA POO

I was doing a calculator, but when I call the add, subtract, etc. method, it does not return its result. The rest of the methods I put them type void and to their result I put it in a system.out.println , I do not know he must do that, bec...
asked by 03.12.2018 / 18:44
1
answer

Android Studio two buttons reproduce same file

Hello, how are you? I am trying to make a button of sounds in Android Studio and I put two buttons "btn1" and "personasjitos" (I leave the code below) when trying the application any of the two buttons I played the same file, Android Studio I do...
asked by 25.09.2018 / 04:33
1
answer

How to implement Enum in java, poo

I'm starting to see the issue of enum in java and I have an exercise in which I'm asked to check which quadrant of the Cartesian plane are certain points, these points are stored in an ArrayList and the teacher told me to Through a enu...
asked by 27.09.2018 / 03:50
1
answer

jax-rs What is the difference between using pathParam and queryParam in a web service?

If I have this code for a rest service in java JAX-RS @Path("/message") public class ExampleRestService { @GET @Path("/test/") public Response printeMessage(@PathParam("param") String mvar ){ String resp = "Mensaje restf...
asked by 26.09.2018 / 04:00
1
answer

The first time you enter the for loop iterates twice

That said, the first time you enter the for loop, you iterate it twice. Then it's still normal but that's not how the first one tells me. public static void main(String[] args) { //a uno se le van presentando personas desconocidas exactas...
asked by 19.09.2018 / 10:56
1
answer

Number of folders and files per directory, Java

I have the following function that calculates the amount of directories and files that are inside each one (now it is a bit modified, but the idea was that). public class ComponentCompare { private static int numDir; private static in...
asked by 20.09.2018 / 17:47
2
answers

How to generate random number that goes in 45 in 45 until you reach 540?

Hello, if someone could help me generate a random number that goes in 45 in 45 to reach 540? package edu.cibertec.hilos; import java.util.Random; import javax.swing.plaf.SliderUI; import edu.cibertec.carrera.CarreraMain; /**...
asked by 19.09.2018 / 17:50
1
answer

ReciclerView android studio

I have a project and I do not know how to edit it. The problem I have is that I need a title and a description. But right now both the title and the description are filled with the same information. How do I modify it? What do I have to do?...
asked by 11.10.2018 / 10:20
2
answers

how to save on the desktop?

My question is how to make a file path String that always points to the desktop regardless of whether the application is changed from one PC to another. I mean that if the application changes it from pc always keep a file on the desktop. Than...
asked by 11.10.2018 / 12:40