Questions tagged as 'java'

1
answer

Generate Query in Web Service Java

I have a Restful web service in Java, I have been able to do CRUD transactions without any problem, but the challenge I have encountered is how to do inner join and filters in a query. I have something like this: @GET @Path("buscar") @Produces...
asked by 19.04.2018 / 00:46
2
answers

Parse variable String to variable Int in Java [duplicated]

I am practicing variable changes in Java using Eclipse and a little doubt has arisen. If I want to change a variable of type String to another variable of integer type (int), which of the two forms is correct or adequate for do it? int varia...
asked by 20.04.2018 / 01:10
1
answer

How to convert the format of the date and time consulted from the Internet?

As you can see in the image below, I check the date and time from the Internet, everything goes well even with the time zone, the problem is that the name of Month and Day < /> of the week come in English, how could I change them to Spanish a...
asked by 12.04.2018 / 00:15
2
answers

It is not sent to call java method, help!

Hello good morning to all, today I am trying a java method and the problem is that it is not sent to call, it is a hashMap this is the original code that was "hard code" and then changed dynamically by means of a SQL query within a method, this...
asked by 27.04.2018 / 16:36
1
answer

Repeated elements in hashmap

Hi, I'm finishing a small application that stores, the total sales of each employee depending on the product sold. I am using a hashmap for this, since I have thought that this data structure is the most efficient for my project. The problem I h...
asked by 03.04.2018 / 18:57
1
answer

Eclipse marks an error in the project browser, but it works ok

I just updated Eclipse Oxigen to Eclipse Java EE IDE for Web Developers. Version: Oxygen.3 Release (4.7.3) From there, a project that had no errors, is indicated in the project browser with an error mark, but only at the root, there is no other...
asked by 03.04.2018 / 11:44
1
answer

ArrayIndexOutOfBounds Java error handling an array

I do not know how to solve this error:    error: Exception in thread "main"   java.lang.ArrayIndexOutOfBoundsException: 0 It takes me to the next class, in the setFilas function, that I use to insert a row into a matrix. package...
asked by 29.03.2018 / 15:00
1
answer

Convert from decimal to binary recursion

I have to implement a recursive function that, given a decimal number lower than 1024, transforms it into binary, using as an element of storage an array of type char. And it has to show - > Example: 10 --- > 0000001010. But the recursi...
asked by 02.04.2018 / 17:28
2
answers

Read and print a byte with read and write

I have this code: public static void main(String[] args) { try { int n = System.in.read(); System.out.write(n); } catch (IOException e) { e.printStackTrace(); } } If I enter, f...
asked by 25.04.2018 / 07:12
1
answer

Problem with ArrayList [closed]

The program is quite simple, x, y, z are Doubles that are constantly updated and I keep the first 2 values of each in an ArrayList and then I want to show them on the screen (I know I could have done a for but copy and paste was faster for 6 XD...
asked by 01.03.2018 / 08:49