Questions tagged as 'java'

1
answer

Method error Get in a collection

I need to use XML in a university job and I had problems with a Get method I had to implement in a Collection p> After a while I took a look at some websites to do this and found the following tutorial , it has a Contact class as foll...
asked by 02.11.2017 / 00:50
2
answers

How to make LinearLayout stay at the bottom of the screen?

I have tried many things here to make my LinearLayout stand at the bottom of the screen but I can not do that. I need to do this with Linear which has the id="underneath" Anyone know? Follow my xml: <?xml version="1.0" encoding="utf-8"?&...
asked by 13.09.2017 / 14:12
1
answer

Method that returns the levels of a Binary Tree

I am trying to implement a Binary Tree for the first time but I am having difficulty in the method that returns the amount of levels present in the tree once it is populated. The method below can perfectly navigate all the elements present in...
asked by 10.09.2017 / 06:34
1
answer

Doubt with error "Unable to build Hibernate SessionFactory" Java

I have received the fonts and after doing the server settings, database etc, I am having this problem in compiling. Thank you if anyone can point you in the right direction. [2017-09-11 10:12:46,640] Artifact multlevel-web:war: Error during...
asked by 11.09.2017 / 21:38
1
answer

Formula Excel - Apache POI

I created an excel file using the Apache Poi API, in it I set one of the cells with a formula, but when I open the file I need to "enter" in the cell with the formula so that it will print the result in the file. Would there be a way to make thi...
asked by 10.11.2017 / 17:19
1
answer

Add Contacts to an Array List

I would like to add contacts to a ArrayList , but adding initial values to the attribute. First I created a Contact Call class, and I want to create a contact type ArrayList and would like to know how to add data to this ArrayList Th...
asked by 20.08.2017 / 20:42
1
answer

Save value of a select and display

I'm developing a CRUD from a web system. In the employee's registry I use two select elements to display the options, when registering everything works ok, the information goes to the bank. The problem is when you click edit and bring this infor...
asked by 20.08.2017 / 20:35
1
answer

Error using date type on android

I have this code: String dt = "2017-01-04"; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); try { sdf.parse(dt); } catch (ParseException e) { e.printStackTrace(); } But when I use dt, in a me...
asked by 06.07.2017 / 15:49
1
answer

How to send parameters via post in java using HttpURLConnection?

I am having a problem to send through a POST method in java parameters using the HttpURLConnection. I've been trying in a few ways and researched a lot, but no way worked for me. I will leave the code below for you to tell me possible modificati...
asked by 13.07.2017 / 00:39
1
answer

Selection Sort - Is it correct?

I have implemented a sort sort logic and would like to ask if it is correct. Because at the end of the process the result is expected, but was to do a real test and found several algorithms but none like my. Follow the code. int vetor[] = {...
asked by 12.07.2017 / 19:08