Questions tagged as 'java'

1
answer

Problem with AVL tree vector

Good afternoon! I'm doing a hash table and for this I'm trying to create an AVL Tree vector. The problem is that when I try to insert a value into any tree of this vector it is giving the "NullPointerException" exception. Could someone tell m...
asked by 02.10.2017 / 20:46
2
answers

When can I use static in the class?

I know that the use of static methods should be avoided, so I have a question and I do not know if it is right to implement ArrayList as static , it is accessed by several classes and contains data from every program (just wa...
asked by 27.09.2017 / 23:31
1
answer

Infinite recursion (StackOverflowError): Error listing products with categories and unit of measures

Good afternoon! I'm trying to list the products registered, but the error below happens: Failed to write HTTP message: org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Infinite recursion (StackOverflowE...
asked by 01.10.2017 / 19:32
1
answer

How to handle Null records? In the bank or app? (java & mysql)

I'm integrating a legacy (MySQL) database with a new module (Java - this problem-giving object is a bean) that I'm developing. I have a method that does a select and returns some results that possibly have some null data and thi...
asked by 25.04.2018 / 22:28
2
answers

Assign Strings to a Date List

I need to allocate for each day a list of dates of a range period, a certain String out of three possible (Class A, Class B, Class C), so that the result is sequential until all the dates in the list are filled out . Follow the code made so f...
asked by 12.11.2016 / 20:40
1
answer

Error in the user registry, changing the user instead insert

My problem is the following, I saw that when I edit a registry, it works, the registry changes, but when I want to register a new user, it falls into the edit condition, it edits the registry information that I was changing previously , not allo...
asked by 09.11.2016 / 13:36
2
answers

How to get current directory of a web application?

I need to know how I get the current directory of my application, since I need to save some PDF files. I've tried it a few times, but to no avail. Can anyone give me a light? Look how I'm doing: public String salvarPDF() throws IOException {...
asked by 19.08.2016 / 05:42
3
answers

Recognition of sound patterns [closed]

I would like to know if there are any Android / Java APIs for sound pattern recognition. Example: Birds singing, the sound is given as input, and the application would return to which bird this sound belongs. The application will be used f...
asked by 13.08.2016 / 08:03
2
answers

AlertDialog from another class

My problem is this, I have an Activity that calls methods from a common Java class to perform operations. Now I've come up with the need for one of these methods to be AlertDialog , I've researched in several places and can not find a...
asked by 24.08.2016 / 16:51
1
answer

Would it be possible to identify 2 larger numbers in a sequence of 5 numbers entered by the user?

I tried to do it, I researched it, but I could not. I would like to know if it is possible to identify two larger numbers without using vectors ? Here's my attempt: int maior1 = 0, maior2 = 0; for(int i = 0; i < 5; i++){ System.out...
asked by 01.02.2016 / 02:05